#include <math.h>
#include <misc/prime.h>
#include <factory/cf_primes.h>
Go to the source code of this file.
static int iiIsPrime0 |
( |
unsigned |
p | ) |
|
|
static |
Definition at line 12 of file prime.cc.
32 unsigned end_p=(unsigned)
sqrt((
double)
p);
34 for (i=0; i<end_i; i++)
43 if (j > end_p)
return p;
int cf_getSmallPrime(int i)
static int iiIsPrime0(unsigned p)
gmp_float sqrt(const gmp_float &a)
int cf_getNumSmallPrimes()
Definition at line 61 of file prime.cc.
64 else if (
p == 1)
return 1;
65 else if ((
p == 2)||(
p==3))
return p;
66 else if (
p < 0)
return 2;
static int iiIsPrime0(unsigned p)