update documentation regarding fp_isprime()

This commit is contained in:
Steffen Jaeckel 2014-10-13 17:14:10 +02:00
parent 3142b0bdfc
commit cb3ed6951e

View File

@ -412,12 +412,17 @@ the least common multiple of $a$ and $b$ and store it in $c$.
To quickly test a number for primality call this function.
\index{fp\_isprime}
\index{fp\_isprime\_ex}
\begin{verbatim}
int fp_isprime(fp_int *a);
int fp_isprime_ex(fp_int *a, int t);
\end{verbatim}
This will return \textbf{FP\_YES} if $a$ is probably prime. It uses 256 trial divisions and
eight rounds of Rabin-Miller testing. Note that this routine performs modular exponentiations
$t$ rounds of Rabin-Miller testing. Note that this routine performs modular exponentiations
which means that $a$ must be in a valid range of precision.
The valid range of $t$ is $1 \ldots 256$.
For backwards compatibility reasons the API function fp\_isprime(a) is still available
and simply calls fp\_isprime\_ex(a, 8).
\chapter{Porting TomsFastMath}
\label{chap:asmops}