docs: public Rational pow(BigInteger exponent) throws NumberFormatException {
          /* test for overflow */
          if (exponent.compareTo(MAX_INT) == 1) {
              throw new NumberFormatException("Exponent " + exponent.toString() + " too large.");
          }
          if (exponent.compareTo(MIN_INT) == -1) {
              throw new NumberFormatException("Exponent " + exponent.toString() + " too small.");
          }
          /* promote to the simpler interface above */
          return pow(exponent.intValue());
      }