Walter Bright wrote:
bearophile wrote:
Walter Bright:
Are you sure? What's the mistake in the code?

This is the code in the Overview, it prints 1899:
http://codepad.org/lzRtggEL

This is the code I have suggested in bugzilla, it prints 1027:
http://ideone.com/D9ZqQ

Wolfram Alpha says they are 1027 (I have left out the last number because Alpha uses a closed interval)
http://www.wolframalpha.com/input/?i=primes+in+2+..+8190


It's been printing 1899 primes since the 80's. Just for fun, google [sieve of eratosthenes 1899 primes]

A small observation: count +=1 is performed for i = 0, hmmm...

Reply via email to