mirror of
https://github.com/cc65/cc65.git
synced 2024-10-31 20:06:11 +00:00
Increase count to 16384. Simplify complex expression.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4064 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
f66cd4a13f
commit
2a2c0fbaf1
@ -18,8 +18,8 @@
|
||||
|
||||
|
||||
|
||||
#define COUNT 8192 /* Up to what number? */
|
||||
#define SQRT_COUNT 91 /* Sqrt of COUNT */
|
||||
#define COUNT 16384 /* Up to what number? */
|
||||
#define SQRT_COUNT 128 /* Sqrt of COUNT */
|
||||
|
||||
static unsigned char Sieve[COUNT];
|
||||
|
||||
@ -68,7 +68,8 @@ int main (void)
|
||||
while (I < SQRT_COUNT) {
|
||||
if (Sieve[I] == 0) {
|
||||
/* Prime number - mark multiples */
|
||||
S = &Sieve[J = I*2];
|
||||
J = I*2;
|
||||
S = &Sieve[J];
|
||||
while (J < COUNT) {
|
||||
*S = 1;
|
||||
S += I;
|
||||
|
Loading…
Reference in New Issue
Block a user