Last change
on this file since 1 was 1, checked in by Marek Rychlik, 15 years ago |
First import of a version circa 1997.
|
File size:
1.1 KB
|
Line | |
---|
1 | \begin{lisp:documentation}{modular$-$inverse}{FUNCTION}{x p }
|
---|
2 | Find the inverse of X modulo prime P, using Euclid algorithm.
|
---|
3 | \end{lisp:documentation}
|
---|
4 |
|
---|
5 | \begin{lisp:documentation}{modular$-$division}{FUNCTION}{x y p }
|
---|
6 | Divide X by Y modulo prime P.
|
---|
7 | \end{lisp:documentation}
|
---|
8 |
|
---|
9 | \begin{lisp:documentation}{*inverse$-$by$-$lookup$-$limit*}{VARIABLE}{100000 }
|
---|
10 | If prime modulus is $<$ this number then the division algorithm
|
---|
11 | will use a lookup table of inverses created at the time when
|
---|
12 | field$-$modulo$-$prime is called.
|
---|
13 | \end{lisp:documentation}
|
---|
14 |
|
---|
15 | \begin{lisp:documentation}{make$-$inverse$-$table}{FUNCTION}{modulus {\sf \&aux} (table (list 0)) }
|
---|
16 | Make a vector of length MODULUS containing all inverses modulo
|
---|
17 | MODULUS, which should be a prime number. The inverse of 0 is 0.
|
---|
18 | \end{lisp:documentation}
|
---|
19 |
|
---|
20 | \begin{lisp:documentation}{make$-$modular$-$division}{FUNCTION}{modulus }
|
---|
21 | Return a function of two arguments which will perform division
|
---|
22 | modulo MODULUS. Currently, if MODULUS is $<$
|
---|
23 | *INVERSE$-$BY$-$LOOKUP$-$LIMIT* then the returned function does table
|
---|
24 | lookup, otherwise it uses the Euclid algorithm to find the inverse.
|
---|
25 | \end{lisp:documentation}
|
---|
26 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.