update documentation regarding fp_isprime()
This commit is contained in:
parent
3142b0bdfc
commit
cb3ed6951e
9
tfm.tex
9
tfm.tex
@ -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.
|
To quickly test a number for primality call this function.
|
||||||
|
|
||||||
\index{fp\_isprime}
|
\index{fp\_isprime}
|
||||||
|
\index{fp\_isprime\_ex}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
int fp_isprime(fp_int *a);
|
int fp_isprime_ex(fp_int *a, int t);
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
This will return \textbf{FP\_YES} if $a$ is probably prime. It uses 256 trial divisions and
|
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.
|
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}
|
\chapter{Porting TomsFastMath}
|
||||||
\label{chap:asmops}
|
\label{chap:asmops}
|
||||||
|
Loading…
Reference in New Issue
Block a user