File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -412,12 +412,17 @@ \section{Prime Numbers}
412412To quickly test a number for primality call this function.
413413
414414\index {fp\_ isprime}
415+ \index {fp\_ isprime\_ ex}
415416\begin {verbatim }
416- int fp_isprime (fp_int *a);
417+ int fp_isprime_ex (fp_int *a, int t );
417418\end {verbatim }
418419This will return \textbf {FP\_ YES } if $ a$ is probably prime. It uses 256 trial divisions and
419- eight rounds of Rabin-Miller testing. Note that this routine performs modular exponentiations
420+ $ t $ rounds of Rabin-Miller testing. Note that this routine performs modular exponentiations
420421which means that $ a$ must be in a valid range of precision.
422+ The valid range of $ t$ is $ 1 \ldots 256 $ .
423+
424+ For backwards compatibility reasons the API function fp\_ isprime(a) is still available
425+ and simply calls fp\_ isprime\_ ex(a, 8).
421426
422427\chapter {Porting TomsFastMath }
423428\label {chap:asmops }
You can’t perform that action at this time.
0 commit comments