docs: public static int ipowi(int x, int p) {
      if(p <= 2) {
        return (int) FastMath.powFast(x, p);
      }
      int tmp = x, ret = (p & 1) == 1 ? x : 1;
      while(true) {
        tmp *= tmp;
        p >>= 1;
        if(p == 1) {
          return ret * tmp;
        }
        if((p & 1) != 0) {
          ret *= tmp;
        }
      }
    }