Browse Source

* Document jacobi, isprobprime and nextprobprime.

master
Richard Kreckel 21 years ago
parent
commit
47c6606172
  1. 5
      ChangeLog
  2. 23
      doc/cln.tex

5
ChangeLog

@ -3,10 +3,15 @@
* configure.ac: Pretend ftime() is not available. Needed by * configure.ac: Pretend ftime() is not available. Needed by
CL_TIMES_CLOCK. 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> 2004-06-18 Richard B. Kreckel <kreckel@ginac.de>
* rational/transcendental/cl_RA_logp.cc: fix bug where base is * rational/transcendental/cl_RA_logp.cc: fix bug where base is
reciprocal of an integer. reciprocal of an integer.
Reported by Niklas Knutsson <nq@altern.org>.
2004-06-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 2004-06-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

23
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 @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 rational number, this function returns true and sets *l = log(a,b), else
it returns false. 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 @end table

Loading…
Cancel
Save