diff --git a/ChangeLog b/ChangeLog index 73225cc..15e0e89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,10 +3,15 @@ * configure.ac: Pretend ftime() is not available. Needed by CL_TIMES_CLOCK. +2004-06-21 Ralf Stephan + + * doc/cln.tex: Document jacobi, isprobprime and nextprobprime. + 2004-06-18 Richard B. Kreckel * rational/transcendental/cl_RA_logp.cc: fix bug where base is reciprocal of an integer. + Reported by Niklas Knutsson . 2004-06-18 Ralf Wildenhues diff --git a/doc/cln.tex b/doc/cln.tex index 63bdd08..216ff30 100644 --- a/doc/cln.tex +++ b/doc/cln.tex @@ -2000,6 +2000,29 @@ normalized to be >= 0. @code{a} must be > 0. @code{b} must be >0 and != 1. If log(a,b) is rational number, this function returns true and sets *l = log(a,b), else it returns false. + +@item int jacobi (sint32 a, sint32 b) +@cindex @code{jacobi()} +@itemx int jacobi (const cl_I& a, const cl_I& b) +Returns the Jacobi symbol +@tex +$\left({a\over b}\right)$, +@end tex +@ifnottex +(a/b), +@end ifnottex +@code{a,b} must be integers, @code{b>0} and odd. The result is 0 +iff gcd(a,b)>1. + +@item cl_boolean isprobprime (const cl_I& n) +@cindex prime +@cindex @code{isprobprime()} +Returns true if @code{n} is a small prime or passes the Miller-Rabin +primality test. The probability of a false positive is 1:10^30. + +@item cl_I nextprobprime (const cl_R& x) +@cindex @code{nextprobprime()} +Returns the smallest probable prime >=@code{x}. @end table