gmpy 0.8 released (fast, high-precision arithmetic)

Alex Martelli aleaxit at
Thu Dec 28 16:54:59 CET 2000

I've posted the announcement to c.l.p.announce, but its
moderation doesn't seem to be active these days.

GMP ( is a fast free library
for arbitrary-precision arithmetic (integers, rationals,
floats), currently at release 3.1.1.

gmpy ( is a C-language
module exposing GMP functionality to Python programs
(and to other C-written Python modules too, through
a simple 'C API').

Other, older modules exposed a subset of GMP's "mpz"
(integers) functionality to older Python versions;
gmpy exposes just about all of GMP 3.1.1 (including
rationals, floats, and a subset of its random number
generation functionality) to Python 2.0, using the
latter's "distutils" to ease building/installing.

The current gmpy release (0.8 pre-alpha) is (I hope!)
very close to alpha level: all relevant GMP functionality
is exposed, there are no known bugs (and workarounds for
a couple of GMP, well, 'anomalies'), documentation is
there (in docstrings _and_ in a textfile), and so are
unit-tests (almost 1,000 are routinely run, with SLOC
coverage of over 92% -- uncovered SLOCs being, almost
exclusively, tests for out-of-memory situations, and
optional debugging-output fprintf's-to-sdterr; I believe
this level of testing-coverage will be adequate for an
alpha-level release).  gmpy 0.8 includes a framework
of call-backs that's not really documented yet (mostly
meant to ease integration with PySymbolic), but that
should not disturb any 'normal' gmpy use.

Main changes currently foreseen for the planned 1.0
alpha release (which I hope to have within January):
[a] I'll rework the current approach to setting module
level options/flags, [b] I'll pretty-up the docs, both
docstrings (reformatting them as per normal Python
conventions) and external-documentation (adding examples,
choosing some spiffier format than plain text).

Any bugfixes that should prove necessary will get the
highest priority.  Performance issues will not (I plan
to address those in the later alpha->beta transition);
I consider current performance well-adequate for an
alpha release (it's faster than Python's built-in
longs for many tasks, and, according to some benchmarks
as kindly measured by Pearu Peterson, faster than many
existing interactive/interpreted systems that can
perform similar arbitrary-precision arithmetic tasks).

Gmpy sources (needed for ALL platforms, as they include
documentation, unit-tests, distutils' are at:
(for non-Win32 platforms, you'll have to download and
install GMP 3.1.1 separately before you can build gmpy
from these sources, see;
be warned that some Linux system come with older releases
of GMP -- ensure you have GMP 3.1.1 or better installed!).

Gmpy binaries for Win32 / MSVC++6 are available at:
    Lundy's port of GMP.LIB 3.1.1, and GMP.H (only needed
    if you intend to rebuild GMPY.PYD from sources with
    Microsoft VC++6 on Win32, in addition to gmpy-sources). is also OK for this
    [but you have to know exactly what to get from there...].
    Note this is NOT updated with gmpy releases; you do not
    need to download it again if you already have it!).
    pre-built gmpy.pyd (release: pre-alpha 0.8), only needed
    on Win32 if you do NOT intend to rebuild GMPY.PYD.  Please
    note: you ALSO need to download gmpy-sources for docs &c!


More information about the Python-list mailing list