Raises a number to a power modulo another number.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static BigInteger ModularPow(
BigInteger value,
int exponent,
BigInteger modulus
)
Public Shared Function ModularPow (
value As BigInteger,
exponent As Integer,
modulus As BigInteger
) As BigInteger
public:
static BigInteger ModularPow(
BigInteger value,
int exponent,
BigInteger modulus
)
static member ModularPow :
value : BigInteger *
exponent : int *
modulus : BigInteger -> BigInteger
Parameters
- value
- Type: Extreme.MathematicsBigInteger
The number to raise to a power. - exponent
- Type: SystemInt32
The exponent. - modulus
- Type: Extreme.MathematicsBigInteger
The modulus.
Return Value
Type:
BigIntegervalue raised to the power
exponent modulo
modulus.
Negative values for the exponent are allowed.
When exponent is equal to -1, the modular inverse is returned.
Reference