lap.pod (1131B)
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/. 4 5 =head1 NAME 6 7 lap - compute least annihilating power of a number 8 9 =head1 SYNOPSIS 10 11 lap <a> <m> 12 13 =head1 DESCRIPTION 14 15 The B<lap> program computes the order of I<a> modulo I<m>, for 16 arbitrary precision integers I<a> and I<m>. The B<order> of I<a> 17 modulo I<m> is defined as the smallest positive value I<n> for which 18 I<a> raised to the I<n>th power, modulo I<m>, is equal to 1. The 19 order may not exist, if I<m> is composite. 20 21 =head1 RESTRICTIONS 22 23 This program is very slow, especially for large moduli. It is 24 intended as a way to help find primitive elements in a modular field, 25 but it does not do so in a particularly inefficient manner. It was 26 written simply to help verify that a particular candidate does not 27 have an obviously short cycle mod I<m>. 28 29 =head1 SEE ALSO 30 31 gcd(1), invmod(1), isprime(1) 32 33 =head1 AUTHOR 34 35 Michael J. Fromberger <sting@linguist.dartmouth.edu> 36 Thayer School of Engineering, Hanover, New Hampshire, USA