code: public static Number power(BigInteger self, Integer exponent) {
          if (exponent >= 0) {
              return self.pow(exponent);
          } else {
              return power(self, (double) exponent);
          }
      }
docs: Power of a BigInteger to an integer certain exponent. If the
  exponent is positive, call the BigInteger.pow(int) method to
  maintain precision. Called by the '**' operator.
  
  @param self     a BigInteger
  @param exponent an Integer exponent
  @return a Number to the power of a the exponent