ANN: GMPY2 or How I learned to love "nan"

C

casevh

Everyone,

I'm pleased to announce a new alpha release of GMPY2.
GMPY2 is a wrapper for GMP and MPFR multiple-precision
arithmetic libraries.

GMPY2 alpha2 introduces context manager support for
MPFR arithmetic. It's now possible to trigger an exception
when comparing against "nan" (and other for other
events that normally generate "nan" or "inf").
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
gmpy2.RangeError: comparison with NaN

If you have an interest in multiple-precision arithmetic
or want more control over the handling of exceptional
events in floating point arithmetic, please check out
GMPY2!

GMPY2 is available for download from:

http://code.google.com/p/gmpy/

Experimental release
--------------------

To simplify the codebase, allow for changes in the API,
and support simultaneous installation, the development
version has been renamed to GMPY2. The following is list
of changes in GMPY2:


In 2.0.0a0
----------

* support for a mutable integer type "xmpz"
* removal of random number functions
* "xmpz" supports slices for setting/clearing bits
* some methods have been renamed (scan1 -> bit_scan1)
* support for Python prior to 2.6 has been removed
* support for all division modes has been added
* ceiling - round to +Infinity
* floor - round to -Infinity
* truncate - round to zero
* 2exp - division by a power of 2
* support is_even() and is_odd()

In 2.0.0a1
----------

* support for the MPFR floating point library

In 2.0.0a2
----------
* context manager support from controlling MPFR
arithmetic
* can raise Python exceptions when exceptional events
occur with MPFR arithmetic; for example, comparing
against "nan" can trigger an exception
* more complete coverage for MPFR
* many function names were changed to be more consistent

Please report any issues!

casevh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top