Runciman, C. (1997) FUNCTIONAL PEARL : lazy wheel sieves and spirals of primes. Journal of Functional Programming. pp. 219-225. ISSN 1469-7653
The popular method of enumerating the primes is the Sieve of Eratosthenes. It can be programmed very neatly in a lazy functional language, but runs rather slowly. A little-known alternative method is the Wheel Sieve, originally formulated as a fast imperative algorithm for obtaining all primes up to a given limit, assuming destructive access to a bit-array. This article describes functional variants of the wheel sieve that enumerate all primes as a lazy list.
|Copyright, Publisher and Additional Information:||© 1997 Cambridge University Press. Reproduced in accordance with the publisher's self-archiving policy.|
|Institution:||The University of York|
|Academic Units:||The University of York > Computer Science (York)|
|Depositing User:||Repository Officer|
|Date Deposited:||19 May 2008 11:35|
|Last Modified:||23 Apr 2015 08:33|