expMod(_:_:)

Modular exponentiation - BInt version

BigInt.swift:1305
func expMod(_ x: BInt, _ m: BInt) -> BInt

Parameters

x

The exponent

m

The modulus

Returns

(self^x) mod m for positive x, ((self^-x) mod m) modInverse m for negative x