Mpmath version 0.9 is now available from the website:
http://code.google.com/p/mpmath/
It can also be downloaded from the Python Package Index:
http://pypi.python.org/pypi/mpmath/0.9
Mpmath is a pure-Python library for arbitrary-precision
floating-point arithmetic that implements an extensive set of
mathematical functions. It can be used as a standalone library
or via SymPy (http://code.google.com/p/sympy/).
The most significant change in 0.9 is that mpmath now transparently
uses GMPY (http://code.google.com/p/gmpy/) integers instead of
Python's builtin integers if GMPY is installed. This makes mpmath
much faster at high precision. Computing 1 million digits of pi,
for example, now only takes ~10 seconds.
Extensive benchmarks (with and without GMPY) are available here:
http://mpmath.googlecode.com/svn/bench/mpbench.html
Credit goes to Case Van Horsen for implementing GMPY support.
There are many new functions, including Jacobi elliptic functions
(contributed by Mike Taschuk), various exponential integrals,
Airy functions, Fresnel integrals, etc. Several missing basic
utility functions have also been added, and Mario Pernici has
taken great care to optimize the implementations of various
elementary functions.
For a more complete changelog, see:
http://mpmath.googlecode.com/svn/trunk/CHANGES
Bug reports and other comments are welcome at the issue tracker:
http://code.google.com/p/sympy/issues/list
or the mpmath mailing list:
http://groups.google.com/group/mpmath
Thanks to all who contributed code or provided feedback for
this release!
Fredrik
Great job!
As I suggested on IRC, maybe a nice area to try is to use Cython to
speed mpmath up to the level of other similar libraries, like mpfr.
What I like on it is that it's hackable and portable, being in pure
python, and for some things it is even faster than Sage:
E.g. in sympy+gmpy:
In [3]: time a = pi.evalf(10**6)
CPU times: user 5.13 s, sys: 0.04 s, total: 5.17 s
Wall time: 5.19 s
Sage 3.1.1:
sage: time a = pi.n(digits=10**6)
CPU times: user 14.06 s, sys: 0.06 s, total: 14.12 s
Wall time: 14.34 s
So while mpfr is probably faster for most other things, mpmath is a
good library as default in sympy. When we incorporate our new core in
sympy in coming weeks, I am sure we could do some interesting
benchmarks with symbolics + numerical evaluation.
Ondrej
> Mpmath version 0.9 is now available from the website:
> http://code.google.com/p/mpmath/
Great!
I'm updating the Debian package an I've noticed that the version in
doc has not been updated:
$ grep ^version doc/source/conf.py
version = '0.8'
so the doc is generated with that version. No problem, I'm patching
that file to refer to 0.9, it's just to let you know.
Cheers,
Sandro
--
Sandro Tosi (aka morph, Morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
Thanks! I've fixed the online docs, but this is too minor to edit the
released files IMO. I guess there should ideally be a script that
updates the version automatically so this doesn't happen again.
Fredrik
Hi morph! :)
Thanks for fixing it.
Ondrej