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