ANN: gmpy 1.04 released

casevh casevh at gmail.com
Mon Feb 2 07:55:24 CET 2009


Everyone,

A new version of gmpy is available. gmpy is a wrapper for the GMP
multiple-precision arithmetic library. This version of gmpy also
supports the MPIR multiple-precision arithmetic library. gmpy 1.04  is
available for download from http://code.google.com/p/gmpy/

There are several new features in this release:

- Support for "rich comparisons".
- Faster conversion to/from Python longs and other formats.
- Fixed conversion of very large numbers to a string (only limited by
memory).
- Support for pickling.
- Support for divexact.
- Support for bit_length.
- Special helper functions to improve the performance of mpmath, an
arbitrary-precision floating point library written in Python, (http://
code.google.com/p/mpmath/).
- Support for MPIR, an alternative multiple-precision library based on
GMP, (http://mpir.org).
- Added fround() to round an mpf value.

WARNING!

A (possibly) significant change was made to the handling of mpf
values. GMP would frequently return more bits in a result than
requested. This led to bugs such such as mpf(1.1)*mpf(1) != mpf(1.1)
but mpf(1.1) / mpf(1) == mpf(1.1). The results of all floating point
calculations are now rounded to the requested precision. mpf
calculations may now produce slightly different results but the
results are still within the bounds of the requested accuracy. As an
alternative, the mpmath library provides consistently rounded floating
point arithmetic and support a wide variety of transcendental
functions.

Comments on provided binaries

The 32-bit Windows installers were compiled using MPIR 0.9 RC2 and
will automatically recognize the CPU type and use code optimized for
that CPU.

gmpy 1.04 libraries are also provided for 64-bit Windows and Python
2.6. There is no installer; the appropriate gmpy.pyd must be copied to
the site-packages directory.

casevh


More information about the Python-announce-list mailing list