
21 Jan
2012
21 Jan
'12
9:38 a.m.
Zhi-Qiang Lei
Hi, what do you mean "more naive wheel trial division"?
Just use a wheel like 2*3*5 and don't bother only dividing by primes. Trying to divide only by primes takes more time than just living with the few percent nonprimes that slip through the wheel. Or better yet, use a sieve like the Sieve of Eratosthenes or the Sieve of Atkin. Those are fairly easy to implement in Haskell. Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife >>= sex) http://ertes.de/