Python-gmp

Latest version: v0.3.1

Safety actively analyzes 723144 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 8

2.1.0a3

------------------------

* Updates to ``setup.py``.
* Initial support for MPFR4

- Add `mpfr_nrandom()`
- `mpfr_grandom()` now calls nrandom twice; may return different values
versus MPFR3.
- Add `rootn()`; same as `root()` except different sign when taking even
root of -0.0.

2.1.0a2

------------------------

* Revised build process.
* Removal of unused code/macros.
* Cleanup of Cython interface.

2.1.0a1

------------------------

* Thread-safe contexts are now supported. Properly integrating thread-safe
contexts required an extensive rewrite of almost all internal functions.
* MPFR and MPC are now required. It is no longer possible to build a version
of gmpy2 that only supports the GMP library.
* The function ``inverse()`` now raises an exception if the inverse does not
exist.
* Context methods have been added for MPFR/MPC related functions.
* A new context option (`~context.rational_division`) has been added that
changes the behavior of integer division involving `mpz` instances to return
a rational result instead of a floating-point result.
* gmpy2 types are now registered in the numeric tower of the
:mod:`numbers` module.
* In previous versions of gmpy2, ``mpz()`` was a factory function that
returned an `mpz` instance. It is now an actual type. The same
is true for the other gmpy2 types.
* If a Python object has an ``__mpz__`` method, it will be called bye ``mpz()``
to allow an unrecognized type to be converted to an mpz instance. The same is
true for the other gmpy2 types.
* A new C-API and Cython interface has been added.

2.0.4

----------------------

* Fix `bit_scan0()` for negative values.
* Changes to ``setup.py`` to allow static linking.
* Fix performance regression with mpmath and Python 3.

2.0.3

----------------------

* Fix `lucas2()` and `atanh()`; they were returning incorrect values.

2.0.2

----------------------

* Rebuild Windows binary installers due to MPIR 2.6.0 bug in `next_prime()`.
* Another fix for `is_extra_strong_lucas_prp()`.

Page 4 of 8

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.