NO DOC
#include <iostream>
#define GIVARO_LENSTRA
#include <givaro/givintnumtheo.h>
#include <givaro/givtimer.h>
#ifndef TIMING
#define TIMING 1
#endif
int main(
int argc,
char** argv)
{
#ifndef __GIVARO_GMP_NO_CXX
#endif
uint64_t runs;
Timer tim; tim.clear();
std::vector<Integer> Lf;
IP.
write(std::cout <<
"Totient : ", Lf,phin) << std::endl;
tim.start();
for(uint64_t i = 0; i <
TIMING; ++i)
IP.prim_root_of_prime(pr,
a);
tim.stop();
IP.
write( std::cout <<
"Deterministic : ", pr ) << std::endl;
std::cerr << tim << std::endl;
}
tim.start();
for(uint64_t i = 0; i <
TIMING; ++i)
IP.prim_root(pr, runs,
a);
tim.stop();
IP.
write( std::cout <<
"Random : ", pr ) << std::endl;
std::cerr << tim << " (" << runs << " runs)" << std::endl;
tim.start();
for(uint64_t i = 0; i <
TIMING; ++i)
IP.lowest_prim_root(pr,
a);
tim.stop();
IP.
write( std::cout <<
"Lowest : ", pr ) << std::endl;
std::cerr << tim << std::endl;
return 0;
}
IntFactorDom IP
Definition: ProbLucas.C:43
int main(int argc, char **argv)
Definition: benchmark-recint_exp.C:20
std::ostream & write(std::ostream &o, const Rep &n) const
Definition: givintfactor.inl:24
int isprime(const Rep &n, int r=_GIVARO_ISPRIMETESTS_) const
Definition: givintprime.h:71
const Element one
Definition: zring.h:61
Rep & sub(Rep &r, const Rep &a, const Rep &b) const
Definition: givinteger.h:90
Rep Element
Definition: givinteger.h:38
Namespace in which the whole Givaro library resides.
Definition: all_field.C:23
MG & a
Definition: rmadd.h:143
#define TIMING
Definition: primitiveroot.C:20