Welcome to gmpy2’s documentation!
gmpy2 is a C-coded Python extension module that supports multiple-precision arithmetic. It is the successor to the original gmpy module (supported only the GMP library). gmpy2 adds support for the MPFR (correctly rounded real floating-point arithmetic) and MPC (correctly rounded complex floating-point arithmetic) libraries.
The following libraries are supported:
GMP for integer and rational arithmetic (https://gmplib.org)
MPFR (https://www.mpfr.org)
Generalized Lucas sequences and primality tests are based on the following code:
mpz_lucas: https://sourceforge.net/projects/mpzlucas/
Contents
- Overview
- Installation
- Tutorial
- Integers
- Integers (Advanced topics)
- Rationals
- Contexts
- Exceptions
- Multiple-precision Reals
- Multiple-precision Complex
- Generic Functions
- Miscellaneous Functions
- Cython usage
- Conversion Methods
- Release Notes
- Changes in gmpy2 2.2.1
- Changes in gmpy2 2.2.0
- Changes in gmpy2 2.1.5
- Changes in gmpy2 2.1.4
- Changes in gmpy2 2.1.3
- Changes in gmpy2 2.1.2
- Changes in gmpy2 2.1.1
- Changes in gmpy2 2.1.0
- Changes in gmpy2 2.1.0rc2
- Changes in gmpy2 2.1.0rc1
- Changes in gmpy2 2.1.0b6
- Changes in gmpy2 2.1.0b5
- Changes in gmpy2 2.1.0b4
- Changes in gmpy2 2.1.0b3
- Changes in gmpy2 2.1.0b2
- Changes in gmpy2 2.1.0b1
- Changes in gmpy2 2.1.a05
- Changes in gmpy2 2.1.0a4
- Changes in gmpy2 2.1.0a3
- Changes in gmpy2 2.1.0a2
- Changes in gmpy2 2.1.0a1
- Changes in gmpy2 2.0.4
- Changes in gmpy2 2.0.3
- Changes in gmpy2 2.0.2
- Changes in gmpy2 2.0.1
- Changes in gmpy2 2.0.0
- Known issues in gmpy2 2.0.0
- Changes in gmpy2 2.0.0b4
- Known issues in gmpy2 2.0.0b4
- Changes in gmpy2 2.0.0b3
- Changes in gmpy2 2.0.0b2
- Changes in gmpy2 2.0.0b1
- Changes in gmpy 1.11
- Changes in gmpy 1.10
- Changes in gmpy 1.04
- Changes in gmpy 1.03
- Changes in gmpy 1.02
- Changes in gmpy 1.01
- Changes in gmpy 1.0
- Changes in gmpy 0.9
- Changes in gmpy 0.8
- Changes in gmpy 0.7
- Changes in gmpy 0.6
- Changes in gmpy 0.5
- Changes in gmpy 0.4
- Changes in gmpy 0.3
- Changes in gmpy 0.2
- Changes in gmpy 0.1