Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site cadovax.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!sdcrdcf!trwrba!cadovax!keithd From: keithd@cadovax.UUCP (Keith Doyle) Newsgroups: net.micro Subject: BYTE benchmark bogosity Message-ID: <286@cadovax.UUCP> Date: Mon, 12-Nov-84 17:46:42 EST Article-I.D.: cadovax.286 Posted: Mon Nov 12 17:46:42 1984 Date-Received: Thu, 15-Nov-84 03:57:28 EST Organization: Contel Cado, Torrance, CA Lines: 20 Has anyone noticed that the original BYTE article and all of the followups on the Sieve of Eras... (forgot how to spell it) Primes program have been perpetuating a BUG? At one time, I wanted to see the primes that it generated. The algorithm works by initializing an array of flags, 1-8192 etc. each used to indicate whether or not the numbers 1-8192 are prime. The program scans the array, first by 2's and marks all multiples of 2 as non-prime. It then scans the array for the next prime, 3, and then scans the array by 3's marking all multiples as non-prime. The original program misses one of these scans (the first one I think) leaving several non-primes marked as prime. The count of primes is then incorrect, and this error has been perpetuated ever since the initial benchmark program was published. Not that it matters really, I suppose it's still a reasonable comparison test, but it does give the wrong answer for the number of primes from 1-8192 (there are 1029). Keith Doyle {ucbvax,decvax}!trwrb!cadovax!keithd