TIMER Example; Sieve of Eratosthenes Prime Number Correction (39188)
This article was previously published under Q39188
SUMMARY
On Page 333 of the "Microsoft QuickBASIC for Apple Macintosh: BASIC
Language Reference", the TIMER function Example (the Sieve of
Eratosthenes benchmark program) is supposed to find prime numbers.
However, it mistakenly finds some numbers that are not actually
prime.
The Sieve of Eratosthenes benchmark program on Page 333 should be
replaced with the version below, which correctly returns only prime
numbers.
Modification Type: |
Minor |
Last Reviewed: |
1/9/2003 |
Keywords: |
KB39188 |
|