Big Integer.Modular Inverse Method
Computes the modular inverse of an integer with respect to the specified modulus.
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
The modular inverse of value with respect to modulus.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public static BigInteger ModularInverse(
BigInteger value,
BigInteger modulus
)
Parameters
- value BigInteger
- modulus BigInteger
- The modulus
Return Value
BigIntegerThe modular inverse of value with respect to modulus.
Remarks
The modular inverse exists only if value and modulus are mutually prime.
Exceptions
Arithmetic | The modular inverse does not exist. |
Argument | modulus is equal to zero. |
Arithmetic | The modular inverse does not exist. |