home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / cug / softt-11.lbr / GCD.DOC < prev    next >
Encoding:
Text File  |  1984-07-05  |  640 b   |  31 lines

  1. .he 'GCD'03/23/80'GCD'
  2. NAME
  3. .sp
  4. gcd - determine greatest common divisor of two integers
  5. .sp 2
  6. SYNOPSIS
  7. .sp
  8. .nf
  9. long_int function gcd (x0, x1)
  10. long_int x0, x1
  11. .sp 2
  12. .fi
  13. DESCRIPTION
  14. .sp
  15. 'Gcd' determines the greatest common divisor of the two long integers
  16. specified as arguments.
  17. The function return is the GCD (always positive).
  18. .sp 2
  19. IMPLEMENTATION
  20. .sp
  21. 'Gcd' is a straightforward implementation of Euclid's algorithm.
  22. .sp 2
  23. BUGS
  24. .sp
  25. Behavior with nonpositive arguments may be considered irrational
  26. by some.
  27. .sp 2
  28. SEE ALSO
  29. .sp
  30. invmod (4)
  31.