//$Header: /cvsroot/esrg/sfesrg/esrgnxpj/sfnthcgi0304/sieve_eratosthenes.h,v 1.4 2003/04/17 20:02:05 dtashley Exp $ // //******************************************************************************** //Copyright (C) 2003 David T. Ashley //******************************************************************************** //This program or source file is free software; you can redistribute it and/or //modify it under the terms of the GNU General Public License as published by //the Free Software Foundation; either version 2 of the License, or (at your //option) any later version. // //This program or source file is distributed in the hope that it will //be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //GNU General Public License for more details. // //You may have received a copy of the GNU General Public License //along with this program; if not, write to the Free Software //Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //******************************************************************************** // #ifndef SIEVE_ERATOSTHENES_H_INCLUDED #define SIEVE_ERATOSTHENES_H_INCLUDED #ifdef MODULE_SIEVE_ERATOSTHENES #define DECMOD_SIEVE_ERATOSTHENES #else #define DECMOD_SIEVE_ERATOSTHENES extern #endif //Declare the factors which must be checked before using the table. #define SIEVE_ERATOSTHENES_N_SIEVE_FACTORS (5) DECMOD_SIEVE_ERATOSTHENES const unsigned SIEVE_ERATOSTHENES_sieve_factors[SIEVE_ERATOSTHENES_N_SIEVE_FACTORS]; //Declare the sieve table itself. #define SIEVE_ERATOSTHENES_N_SIEVE (480) DECMOD_SIEVE_ERATOSTHENES const unsigned SIEVE_ERATOSTHENES_sieve[SIEVE_ERATOSTHENES_N_SIEVE]; //Declare the first starting prime number to use in the trial divisions, and //after that is exhausted the index of the first table entry to use to advance //the trial divisor. #define SIEVE_ERATOSTHENES_FIRST_TRIAL_DIVISOR (13) #define SIEVE_ERATOSTHENES_FIRST_SIEVE_INDEX (1) #endif /* SIEVE_ERATOSTHENES_H_INCLUDED */ //******************************************************************************** // $Log: sieve_eratosthenes.h,v $ // Revision 1.4 2003/04/17 20:02:05 dtashley // License text for the GPL added. All source files are now under the GPL, // after some discussion on the GMP list. // // Revision 1.3 2003/04/16 07:02:06 dtashley // Spelling of Greek name corrected to Eratosthenes from incorrect Erastothenes. // // Revision 1.2 2003/04/15 22:46:18 dtashley // sieve_erastothenes.c // // Revision 1.1 2003/04/15 22:35:41 dtashley // Initial checkin. //******************************************************************************** // End of SIEVE_ERATOSTHENES.H. //********************************************************************************