number theory libraries / project euler

andrew cooke andrew at acooke.org
Wed Feb 18 15:32:12 EST 2009


eliben wrote:
> Hello,
>
> What are some good & recommended number theory libs for Python (or
> accessible interfaces to C libs), for things like primes,
> factorization, etc. Naturally, speed is of utmost importance here.

i just read the project site and one of the things they say on their front
page is that all problems have a solution that should run in "under a
minute".  the emphasis is on finding the right algorithm, not brute force
number crunching.  so i am not sure that speed is of much importance at
all.

> In other words, which Python libraries and tools to you use to help
> you solve Project Euler problems :-) ?

you may want to look at numpy and scipy, but looking at the first dozen
questions i think ordinary python may be sufficient.

andrew





More information about the Python-list mailing list