Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 =head1 NAME
7 invmod - compute modular inverse of an integer
9 =head1 SYNOPSIS
11 invmod <a> <m>
13 =head1 DESCRIPTION
15 The B<invmod> program computes the inverse of I<a>, modulo I<m>, if
16 that inverse exists. Both I<a> and I<m> are arbitrary-precision
17 integers in decimal notation. The result is written in standard
18 decimal notation to the standard output.
20 If there is no inverse, the message:
22 No inverse
24 ...will be printed to the standard output (an inverse exists if and
25 only if the greatest common divisor of I<a> and I<m> is 1).
27 =head1 SEE ALSO
29 gcd(1), isprime(1), lap(1)
31 =head1 AUTHOR
33 Michael J. Fromberger <sting@linguist.dartmouth.edu>
34 Thayer School of Engineering, Hanover, New Hampshire, USA