Big Integer.Modular Inverse Method
Computes the modular inverse of an integer with respect to the specified modulus.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
The modular inverse of value with respect to modulus.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
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. |