Package gmp


package gmp
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:
  • Classes
    Class
    Description
    MPFR multi-precision floating-point numbers.
    GMP arbitrary precision rationals.
    GMP arbitrary precision integers.
    Class of references to numerators and denominator of Mpq objects.
    Pseudo-random number generation states.
    Simple test for the Java GMP / MPFR binding.