From 2a2c0fbaf107de799e39820be09be140a9b7302c Mon Sep 17 00:00:00 2001 From: uz Date: Fri, 28 Aug 2009 17:21:58 +0000 Subject: [PATCH] Increase count to 16384. Simplify complex expression. git-svn-id: svn://svn.cc65.org/cc65/trunk@4064 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- samples/sieve.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/samples/sieve.c b/samples/sieve.c index b2fc9cdbc..7294954dc 100644 --- a/samples/sieve.c +++ b/samples/sieve.c @@ -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; -- 2.39.5