]> www.ginac.de Git - cln.git/commitdiff
* Document jacobi, isprobprime and nextprobprime.
authorRichard Kreckel <kreckel@ginac.de>
Wed, 23 Jun 2004 21:50:54 +0000 (21:50 +0000)
committerRichard Kreckel <kreckel@ginac.de>
Wed, 23 Jun 2004 21:50:54 +0000 (21:50 +0000)
ChangeLog
doc/cln.tex

index 73225ccc2f6fba48353110386b511761b3db4d26..15e0e89838bcedc581fa8da4570dbb2cec88dacf 100644 (file)
--- 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  <ralf@ark.in-berlin.de>
+
+       * doc/cln.tex: Document jacobi, isprobprime and nextprobprime.
+
 2004-06-18  Richard B. Kreckel  <kreckel@ginac.de>
 
        * rational/transcendental/cl_RA_logp.cc: fix bug where base is
        reciprocal of an integer.
+       Reported by Niklas Knutsson <nq@altern.org>.
 
 2004-06-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
index 63bdd0871eea9941a1a110260cf6ffef0d84b9da..216ff301aa5e43bd4b00730b5847e2ab81972997 100644 (file)
@@ -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