mod Pow
Returns a BigInteger whose value is (this<sup>exponent</sup> rem m). (Unlike pow, this method permits negative exponents.)
Return
this<sup>exponent</sup> rem m
Parameters
exponent
the exponent.
modulus
the modulus.
See also
.modInverse
Throws
m 0 or the exponent is negative and this BigInteger is not relatively prime to m.