/[dtapublic]/projs/dtats/trunk/projs/2018/20180707_cgi_web_tools_aux_exe/sieve_eratosthenes.h
ViewVC logotype

Contents of /projs/dtats/trunk/projs/2018/20180707_cgi_web_tools_aux_exe/sieve_eratosthenes.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 170 - (show annotations) (download)
Sun Jul 8 21:12:48 2018 UTC (6 years, 3 months ago) by dashley
File MIME type: text/plain
File size: 3021 byte(s)
Reorganize.
1 //$Header: /cvsroot/esrg/sfesrg/esrgnxpj/sfnthcgi0304/sieve_eratosthenes.h,v 1.4 2003/04/17 20:02:05 dtashley Exp $
2 //
3 //********************************************************************************
4 //Copyright (C) 2003 David T. Ashley
5 //********************************************************************************
6 //This program or source file is free software; you can redistribute it and/or
7 //modify it under the terms of the GNU General Public License as published by
8 //the Free Software Foundation; either version 2 of the License, or (at your
9 //option) any later version.
10 //
11 //This program or source file is distributed in the hope that it will
12 //be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 //GNU General Public License for more details.
15 //
16 //You may have received a copy of the GNU General Public License
17 //along with this program; if not, write to the Free Software
18 //Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //********************************************************************************
20 //
21 #ifndef SIEVE_ERATOSTHENES_H_INCLUDED
22 #define SIEVE_ERATOSTHENES_H_INCLUDED
23
24 #ifdef MODULE_SIEVE_ERATOSTHENES
25 #define DECMOD_SIEVE_ERATOSTHENES
26 #else
27 #define DECMOD_SIEVE_ERATOSTHENES extern
28 #endif
29
30 //Declare the factors which must be checked before using the table.
31 #define SIEVE_ERATOSTHENES_N_SIEVE_FACTORS (5)
32 DECMOD_SIEVE_ERATOSTHENES
33 const unsigned SIEVE_ERATOSTHENES_sieve_factors[SIEVE_ERATOSTHENES_N_SIEVE_FACTORS];
34
35 //Declare the sieve table itself.
36 #define SIEVE_ERATOSTHENES_N_SIEVE (480)
37 DECMOD_SIEVE_ERATOSTHENES
38 const unsigned SIEVE_ERATOSTHENES_sieve[SIEVE_ERATOSTHENES_N_SIEVE];
39
40 //Declare the first starting prime number to use in the trial divisions, and
41 //after that is exhausted the index of the first table entry to use to advance
42 //the trial divisor.
43 #define SIEVE_ERATOSTHENES_FIRST_TRIAL_DIVISOR (13)
44 #define SIEVE_ERATOSTHENES_FIRST_SIEVE_INDEX (1)
45
46 #endif /* SIEVE_ERATOSTHENES_H_INCLUDED */
47
48 //********************************************************************************
49 // $Log: sieve_eratosthenes.h,v $
50 // Revision 1.4 2003/04/17 20:02:05 dtashley
51 // License text for the GPL added. All source files are now under the GPL,
52 // after some discussion on the GMP list.
53 //
54 // Revision 1.3 2003/04/16 07:02:06 dtashley
55 // Spelling of Greek name corrected to Eratosthenes from incorrect Erastothenes.
56 //
57 // Revision 1.2 2003/04/15 22:46:18 dtashley
58 // sieve_erastothenes.c
59 //
60 // Revision 1.1 2003/04/15 22:35:41 dtashley
61 // Initial checkin.
62 //********************************************************************************
63 // End of SIEVE_ERATOSTHENES.H.
64 //********************************************************************************

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25