[Haskell-beginners] Re: Integer factorization

Ertugrul Soeylemez es at ertes.de
Sat Mar 14 11:39:24 EDT 2009


"Sergey V. Mikhanov" <sergey at mikhanov.com> wrote:

> I am solving a problem of finding the largest prime factor of
> 600851475143 (Project Euler is great for learning new language!),
> [...]

You may find my little auxilliary library [1] for ProjectEuler.net
problems handy.  For the specific problem of factoring an integer, it
uses the wheel factoring method, which uses the idea of Eratosthenes
sieving to filter out most non-primes with almost no performance loss
compared to the more naive trial division method.

[1] http://hpaste.org/fastcgi/hpaste.fcgi/view?id=2388


Greets,
Ertugrul.


-- 
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://blog.ertes.de/




More information about the Beginners mailing list