Example in the overview

bearophile bearophileHUGS at lycos.com
Fri May 14 17:30:08 PDT 2010


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

You are right, isn't life fun? :-)
But there is little double the result is:

>>> pr = (x for x in xrange(2,8191) if all(x % i for i in xrange(2,x)))
>>> len(list(pr))
1027

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list