Computes the modular multiplicative inverse.
x = number_inversemod ( a , n )
a 1x1 matrix of floating point integers, must be positive
a 1x1 matrix of floating point integers, must be positive
a 1x1 matrix of floating point integers
Returns the multiplicative inverse of a modulo n, i.e. returns x such that .
Uses number_solvelinmod.
number_inversemod ( 3 , 11 ) // 4
"Introduction to algorithms", Cormen, Leiserson, Rivest, Stein, 2nd edition