Ticket #9451 (new enhancement)
[with patch, needs work] sieve of atkin
|Reported by:||rohana||Owned by:||was|
|Component:||number theory||Keywords:||prime, sieve, range|
|Cc:||was, kevin.stueve, robertwb||Work issues:|
Description (last modified by rohana) (diff)
The goal of this ticket is to efficiently implement the sieve of atkin. This first version is a step in that direction.
Paper on the sieve can be found at http://bit.ly/sieveatkin
The implementation is written to be run in parallel, however I am unaware of any good method of making it parallel within cython (it would be nice to get openmp in there sometime).
Due to the length of the implementation, I moved prime_range from fast_arith into a new module.
The current implementation uses 64-bit ints and hits that barrier at input around 2**56, so I've capped it at 2**52 (in the future I plan to remove this limitation).
I've changed the default algorithm to atkins, since it is nearly as fast as the pari table, but doesn't use as much storage so it is more viable for large input.
Docstrings are incomplete.