home *** CD-ROM | disk | FTP | other *** search
- .he 'GCD'03/23/80'GCD'
- NAME
- .sp
- gcd - determine greatest common divisor of two integers
- .sp 2
- SYNOPSIS
- .sp
- .nf
- long_int function gcd (x0, x1)
- long_int x0, x1
- .sp 2
- .fi
- DESCRIPTION
- .sp
- 'Gcd' determines the greatest common divisor of the two long integers
- specified as arguments.
- The function return is the GCD (always positive).
- .sp 2
- IMPLEMENTATION
- .sp
- 'Gcd' is a straightforward implementation of Euclid's algorithm.
- .sp 2
- BUGS
- .sp
- Behavior with nonpositive arguments may be considered irrational
- by some.
- .sp 2
- SEE ALSO
- .sp
- invmod (4)