Runciman, C. (1997) FUNCTIONAL PEARL : lazy wheel sieves and spirals of primes. Journal of Functional Programming. pp. 219-225. ISSN 1469-7653
Full text available as:
|
Text (runcimanc1.pdf)
runcimanc1.pdf Download (120Kb) |
Published Version: http://dx.doi.org/10.1017/S0956796897002670
Abstract
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.
| Item Type: | Article |
|---|---|
| Copyright, Publisher and Additional Information: | © 1997 Cambridge University Press. Reproduced in accordance with the publisher's self-archiving policy. |
| Academic Units: | The University of York > Computer Science (York) |
| Depositing User: | Repository Officer |
| Date Deposited: | 19 May 2008 11:35 |
| Last Modified: | 19 Feb 2013 12:09 |
| Published Version: | http://dx.doi.org/10.1017/S0956796897002670 |
| Status: | Published |
| Refereed: | Yes |
| Related URLs: | |
| URI: | http://eprints.whiterose.ac.uk/id/eprint/3784 |
Actions (login required)
![]() |
View Item |





