Skip to main content

GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3.x

Project description

gmpy2 is a C-coded Python extension module that supports multiple-precision arithmetic. In addition to supporting GMP or MPIR for multiple-precision integer and rational arithmetic, gmpy2 adds support for the MPFR (correctly rounded real floating-point arithmetic) and MPC (correctly rounded complex floating-point arithmetic) libraries.

Release 2.0.8 has the following fixes:

  1. Fix reference counting bug in left shift and right shift.

  2. Fix crash when converting string to mpfr and subnormalization is active.

  3. Fix int(mpfr) for negative values.

  4. Fix data corruption bug when using pack() on a list that contains instances of the mpz type.

Release 2.0.7 has the following fixes:

  1. math.floor(gmpy2.mpfr(‘inf’)) no longer segfaults.

  2. The “wheel” format is used for the Windows binaries.

Release 2.0.6 has the following fixes:

  1. setup.py no longer changes the meaning of –prefix.

  2. Using the ‘X’ format code now works properly (convert to hex using upper-case letters).

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page