modInverse

fun modInverse(m: BigInteger): BigInteger

Returns a BigInteger whose value is (this<sup>-1</sup> rem m).

Return

this<sup>-1</sup> rem m.

Parameters

m

the modulus.

Throws

m 0, or this BigInteger has no multiplicative inverse rem m (that is, this BigInteger is not relatively prime to m).