| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Factory.Math.Implementations.Primes.SieveOfAtkin
Description
AUTHOR- Dr. Alistair Ward
 DESCRIPTION
- Generates the constant bounded list of prime-numbers, using the Sieve of Atkin; https://en.wikipedia.org/wiki/Sieve_of_Atkin.
 - cr.yp.to/papers/primesieves-19990826.pdf.
 - The implementation;
		has been optimised using a wheel of static, but parameterised, size;
		has been parallelized;
		is polymorphic, but with a specialisation for type 
Int. 
CAVEAT- The 
Int-specialisation is implemented by a rewrite-rule, which is very fragile. 
Synopsis
- sieveOfAtkin :: (NFData i, Ix i, Integral i) => NPrimes -> i -> [i]
 
Types
Data-types
Constants
Functions
Arguments
| :: (NFData i, Ix i, Integral i) | |
| => NPrimes | Other implementations effectively use a hard-coded value either 2 or 3, but 6 seems better.  | 
| -> i | The maximum prime required.  | 
| -> [i] | The bounded list of primes.  | 
- Generates the constant bounded list of prime-numbers.
 - https://cr.yp.to/papers/primesieves-19990826.pdf