Wilang Documentation1.0.0+4

invmod#

Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax ≣ 1 (mod b)

Available in: math cells, REPL.

Syntax#

invmod(a, b)

Arguments and behavior#

Arguments must match one of the syntax forms above. Use the example as a starting point; arrays and numeric types are accepted only by compatible overloads. The example returns scalar (number).

Example#

Edit the inputs, then use Run or Reset. Changes stay in this example.

Example
invmod(3,11)

Expected result: 4.

See also#

gcd · xgcd

All functions · Math guides