BigInteger.modPow

Returns a BigInteger whose value is <code>(this<sup>exponent</sup> mod m)</code>. (Unlike {@code pow}, this method permits negative exponents.)

@param exponent the exponent. @param m the modulus. @return <code>this<sup>exponent</sup> mod m</code> @throws ArithmeticException {@code m} &le; 0 or the exponent is negative and this BigInteger is not <i>relatively prime</i> to {@code m}. @see #modInverse

class BigInteger
modPow

Meta