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

  1. .he 'INVMOD'03/23/80'INVMOD'
  2. NAME
  3. .sp
  4. invmod - find inverse of an integer modulo another integer
  5. .sp 2
  6. SYNOPSIS
  7. .sp
  8. .nf
  9. long_int function invmod (x1, x0)
  10. long_int x1, x0
  11. .sp 2
  12. .fi
  13. DESCRIPTION
  14. .sp
  15. 'Invmod' is used to find the inverse of 'x1' in the ring of
  16. integers modulo 'x0'.
  17. The function return is the inverse if it could be found, or
  18. ERR if 'x1' and 'x0' are not relatively prime.
  19. .sp 2
  20. IMPLEMENTATION
  21. .sp
  22. 'Invmod' uses a variant of Euclid's greatest common divisor
  23. algorithm.
  24. .sp 2
  25. BUGS
  26. .sp
  27. Rational behavior for nonpositive arguments has not been established.
  28. .sp
  29. Locally supported.
  30. .sp 2
  31. SEE ALSO
  32. .sp
  33. gcd (4)
  34.