NAME invmod - find inverse of an integer modulo another integer SYNOPSIS long_int function invmod (x1, x0) long_int x1, x0 DESCRIPTION 'Invmod' is used to find the inverse of 'x1' in the ring of integers modulo 'x0'. The function return is the inverse if it could be found, or ERR if 'x1' and 'x0' are not relatively prime. IMPLEMENTATION 'Invmod' uses a variant of Euclid's greatest common divisor algorithm. BUGS Rational behavior for nonpositive arguments has not been established. Locally supported. SEE ALSO gcd (4)