Wednesday, October 15, 2008

ANN: mpmath 0.10

Mpmath version 0.10 is now available. From the release announcement:

Additions in 0.10 include plotting support, matrices and linear algebra functions, new root-finding and quadrature algorithms, enhanced interval arithmetic, and some new special functions. Many speed improvements have been committed (a few functions are an order of magnitude faster than in 0.9), and as usual various bugs have been fixed. Importantly, this release fixes mpmath to work with Python 2.6.

For a more complete changelog, see: http://mpmath.googlecode.com/svn/trunk/CHANGES


Also be sure to check out the function gallery! It contains pretty colors ;-)

Saturday, October 4, 2008

Mpmath's first birthday

A little over a week ago, mpmath became 1 year old! I made the first SVN checkin on September 25, 2007. The source recently reached 10,000 lines of code (14,000 including blanks and comments), so it has grown up quickly.

The last release (version 0.9) happened over a month ago. There have been a lot of changes to the trunk since then, including linear algebra functions (written by Vinzent Steinberg), function plotting (using matplotlib), significantly improved interval arithmetic, polygamma functions, fast computation of Bernoulli numbers, Gauss-Legendre quadrature, and many speed improvements/bugfixes.

As a teaser, here is the Riemann zeta function on the critical line:

from mpmath import *
plot(lambda t: zeta(0.5+t*j), [0, 50])



With all these additions, it'd be nice to make a new release soon; especially since 0.9 isn't compatible with Python 2.6. Now, I'm not personally going to switch over to Python 2.6 immediately (since some of the libraries I use aren't available for it), but most likely some users will. An advantage of mpmath's pure Python design is that it should work with minimal changes across Python versions, and the only reason it doesn't work with Python 2.6 is a trivial bug ("as" being used for a variable) which has been fixed in SVN.

I'm currently working on some rather heavy (and long overdue) global code cleanup, and there are too many loose threads to make an immediate release. But hopefully there will be one within 1 or 2 weeks. (The main obstacle, as usual, is that I also have upcoming exams...)

Of course, for anyone who wishes to play with the new features right now, it's easy to check out the current SVN trunk.

In other news, the mpmath website recently vanished from Google's search results. I hate when that happens...