Back to Symbolic Math (SymEngine)
sym.modInverse
Computes the modular inverse of a modulo m.
Syntax
sym.modInverse(a, m)
Description
Computes the modular inverse of a modulo m. Returns b such that a*b ≡ 1 (mod m), if it exists.
Parameters
| Name | Description |
|---|---|
| a | - The number to invert. |
| m | - The modulus. |
Returns
Expr | null