30 for (
int i= 0;
i <
k;
i++)
44 double pi= 3.141592653589793;
45 double a= 0.140012288;
48 double buf= 2.0/(
pi*a)+
log (1.0-d*d)/2.0;
74 double pn=
pow ((
double)
p, (
double) n);
Rational pow(const Rational &a, int e)
const CanonicalForm CFMap CFMap & N
CanonicalForm compress(const CanonicalForm &f, CFMap &m)
CanonicalForm compress ( const CanonicalForm & f, CFMap & m )
generate random integers, random elements of finite fields
generate random elements in F_p
const CanonicalForm int s
double numZeros(const CanonicalForm &F, int k)
evaluate F at k random points in Z/p^n and count the number of zeros that occur
int probIrredTest(const CanonicalForm &F, double error)
given some error probIrredTest detects irreducibility or reducibility of F with confidence level 1-er...
double inverseERF(double d)
This file provides a probabilistic irreducibility test for polynomials over Z/p.
gmp_float sqrt(const gmp_float &a)
gmp_float log(const gmp_float &a)
int status int void * buf