expMod(_:_:)

Modular exponentiation - Int version

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

Parameters

x

The exponent

m

The modulus

Returns

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