Skip navigation links

Package gmp

Java binding for the GNU Multiple Precision Arithmetic Library (GMP) and the Multiple Precision Floating-Point Reliable Library (MPFR).

See: Description

Package gmp Description

Java binding for the GNU Multiple Precision Arithmetic Library (GMP) and the Multiple Precision Floating-Point Reliable Library (MPFR).

This includes arbitrary-precision integers Mpz and rationals Mpq (growing as needed), and multi-precision floating-points numbers Mpfr that extend the IEEE-754 standard to an arbitrary, user-chosen precision level.

Unlike Java's BigIntegers, all Mpz, Mpq, and Mpfr objects are mutable.

Most arithmetic operators are in three-address mode: the this object is the destination while the operator arguments are unchanged (with the exception of the division and extended gcd, where extra results are returned in the first arguments). It is possible to pass the same object (including this) as source and destination of an operation. However, when an operator modifies several objects, these must be distinct.

The binding is based on GMP 4.3.2 and MPFR 2.4.1.

See Also:
http://gmplib.org/, http://www.mpfr.org/
Skip navigation links