NO DOC.
NO DOC
#include <iostream>
#include "givaro/givintprime.h"
#include "givaro/givtimer.h"
int main(int argc, char** argv)
{
if (argc > 1)
else
std::cin >> np;
if (argc > 2)
else
m = 2;
unsigned long long nb = (IPD.
isprime(m)?1:0);
for (;m < np; tp *= 2) {
std::cout << nb << " primes between " << nf << " and " << m << "\t\t == nextprime(" << (ttp+nf-1) << ")" << std::endl; ttp = tp;
for (;(m < np) && (m < (nf+tp)); ++nb)
}
std::cout << (m>np?nb-1:nb) << " primes between " << nf << " and " << np << std::endl << tim << std::endl;
return 0;
}
Primality tests.
Definition: givintprime.h:65
This is the Integer class.
Definition: gmp++_int.h:160
Timer.
Definition: givtimer.h:129
void start()
Start timer.
Definition: givtimer.C:190
void stop()
Stop timer.
Definition: givtimer.C:198
void clear()
Clear timer.
Definition: givtimer.C:181
Namespace in which the whole Givaro library resides.
Definition: all_field.C:23