gmpy2: Python interface to GMP/MPIR, MPFR, and MPC#
Description#
GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3.x
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.
Type#
standard
Dependencies#
$(MP_LIBRARY)
mpfr: Multiple-precision floating-point computations with correct rounding
mpc: Arithmetic of complex numbers with arbitrarily high precision and correct rounding
$(PYTHON_TOOLCHAIN)
$(PYTHON)
Version Information#
package-version.txt:
2.1.2
install-requires.txt:
gmpy2 >=2.1.0
Equivalent System Packages#
arch:
$ sudo pacman -S python-gmpy2
conda:
$ conda install gmpy2
Debian/Ubuntu:
$ sudo apt-get install python3-gmpy2
Fedora/Redhat/CentOS:
$ sudo yum install python-gmpy2
freebsd:
$ sudo pkg install math/py-gmpy2
gentoo:
$ sudo emerge dev-python/gmpy
macports: install the following packages: py-gmpy2
opensuse:
$ sudo zypper install python3${PYTHON_MINOR}-gmpy2
void:
$ sudo xbps-install python3-gmpy2
See https://repology.org/project/python:gmpy2/versions, https://repology.org/project/python:gmpy2-devel/versions
If the system package is installed and if the (experimental) option –enable-system-site-packages is passed to ./configure, then ./configure will check if the system package can be used.