Example in the overview
Ary Borenszweig
ary at esperanto.org.ar
Fri May 14 17:27:29 PDT 2010
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...
More information about the Digitalmars-d-learn
mailing list