home *** CD-ROM | disk | FTP | other *** search
- .he 'INVMOD'03/23/80'INVMOD'
- NAME
- .sp
- invmod - find inverse of an integer modulo another integer
- .sp 2
- SYNOPSIS
- .sp
- .nf
- long_int function invmod (x1, x0)
- long_int x1, x0
- .sp 2
- .fi
- DESCRIPTION
- .sp
- '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.
- .sp 2
- IMPLEMENTATION
- .sp
- 'Invmod' uses a variant of Euclid's greatest common divisor
- algorithm.
- .sp 2
- BUGS
- .sp
- Rational behavior for nonpositive arguments has not been established.
- .sp
- Locally supported.
- .sp 2
- SEE ALSO
- .sp
- gcd (4)