|
@ -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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|