From: uz Date: Fri, 28 Aug 2009 17:21:58 +0000 (+0000) Subject: Increase count to 16384. Simplify complex expression. X-Git-Tag: V2.13.0rc1~192 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2a2c0fbaf107de799e39820be09be140a9b7302c;p=cc65 Increase count to 16384. Simplify complex expression. git-svn-id: svn://svn.cc65.org/cc65/trunk@4064 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- 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;