37 |
#else |
#else |
38 |
#define DECMOD_SIEVE_ERATOSTHENES extern |
#define DECMOD_SIEVE_ERATOSTHENES extern |
39 |
#endif |
#endif |
40 |
|
|
41 |
//Declare the factors which must be checked before using the table. |
//Declare the factors which must be checked before using the table. |
42 |
#define SIEVE_ERATOSTHENES_N_SIEVE_FACTORS (5) |
#define SIEVE_ERATOSTHENES_N_SIEVE_FACTORS (5) |
43 |
DECMOD_SIEVE_ERATOSTHENES |
DECMOD_SIEVE_ERATOSTHENES |
44 |
const unsigned SIEVE_ERATOSTHENES_sieve_factors[SIEVE_ERATOSTHENES_N_SIEVE_FACTORS]; |
const unsigned SIEVE_ERATOSTHENES_sieve_factors[SIEVE_ERATOSTHENES_N_SIEVE_FACTORS]; |
45 |
|
|
46 |
//Declare the sieve table itself. |
//Declare the sieve table itself. |
47 |
#define SIEVE_ERATOSTHENES_N_SIEVE (480) |
#define SIEVE_ERATOSTHENES_N_SIEVE (480) |
48 |
DECMOD_SIEVE_ERATOSTHENES |
DECMOD_SIEVE_ERATOSTHENES |
49 |
const unsigned SIEVE_ERATOSTHENES_sieve[SIEVE_ERATOSTHENES_N_SIEVE]; |
const unsigned SIEVE_ERATOSTHENES_sieve[SIEVE_ERATOSTHENES_N_SIEVE]; |
50 |
|
|
51 |
//Declare the first starting prime number to use in the trial divisions, and |
//Declare the first starting prime number to use in the trial divisions, and |
52 |
//after that is exhausted the index of the first table entry to use to advance |
//after that is exhausted the index of the first table entry to use to advance |
53 |
//the trial divisor. |
//the trial divisor. |
54 |
#define SIEVE_ERATOSTHENES_FIRST_TRIAL_DIVISOR (13) |
#define SIEVE_ERATOSTHENES_FIRST_TRIAL_DIVISOR (13) |
55 |
#define SIEVE_ERATOSTHENES_FIRST_SIEVE_INDEX (1) |
#define SIEVE_ERATOSTHENES_FIRST_SIEVE_INDEX (1) |
57 |
#endif /* SIEVE_ERATOSTHENES_H_INCLUDED */ |
#endif /* SIEVE_ERATOSTHENES_H_INCLUDED */ |
58 |
|
|
59 |
//******************************************************************************** |
//******************************************************************************** |
60 |
// End of SIEVE_ERATOSTHENES.H. |
// End of SIEVE_ERATOSTHENES.H. |
61 |
//******************************************************************************** |
//******************************************************************************** |