\begin{lisp:documentation}{modular$-$inverse}{FUNCTION}{x p }
Find the inverse of X modulo prime P, using Euclid algorithm.
\end{lisp:documentation}

\begin{lisp:documentation}{modular$-$division}{FUNCTION}{x y p }
Divide X by Y modulo prime P.
\end{lisp:documentation}

\begin{lisp:documentation}{*inverse$-$by$-$lookup$-$limit*}{VARIABLE}{100000 }
If prime modulus is $<$ this number then the division algorithm
will use a lookup table of inverses created at the time when
field$-$modulo$-$prime is called. 
\end{lisp:documentation}

\begin{lisp:documentation}{make$-$inverse$-$table}{FUNCTION}{modulus {\sf \&aux} (table (list 0)) }
Make a vector of length MODULUS containing all inverses modulo
MODULUS, which should be a prime number. The inverse of 0 is 0.
\end{lisp:documentation}

\begin{lisp:documentation}{make$-$modular$-$division}{FUNCTION}{modulus }
Return a function of two arguments which will perform division
modulo MODULUS. Currently, if MODULUS is $<$
*INVERSE$-$BY$-$LOOKUP$-$LIMIT* then the returned function does table
lookup, otherwise it uses the Euclid algorithm to find the inverse.
\end{lisp:documentation}

