Links
Internal links:
External links on :
Introduction
The library is a C library for multiple-precision floating-point computations with correct rounding. has continuously been supported by the and the current main authors come from the and Pascaline project-teams at (Nancy, France) and (Lyon, France) respectively; see more on the credit page. is based on the multiple-precision library.
The main goal of is to provide a library for multiple-precision floating-point computation which is both efficient and has a well-defined semantics. It copies the good ideas from the /-754 standard for double-precision floating-point arithmetic (53-bit significand).
is free. It is distributed under the Lesser General Public License ( Lesser ), version 3 or later (2.1 or later for versions until 2.4.x). The library has been registered in France by the Agence de Protection des Programmes under the number IDDN FR 001 120020 00 R P 2000 000 10800, on 15 March 2000. This license guarantees your freedom to share and change , to make sure is free for all its users. Unlike the ordinary General Public License, the Lesser enables developers of non-free programs to use in their programs. If you have written a new function for or improved an existing one, please share your work!
Extensions
- The multiple-precision arithmetic is very useful for interval arithmetic. Get a multiple-precision interval arithmetic library , based on . This library is developed by Nathalie Revol from the Pascaline project and Fabrice Rouillier. implements a subset of the mathematical functions provided by . Read more explanations on Nathalie Revol's software page.
- The library, a library for multiple-precision complex arithmetic with correct rounding, based on the and libraries.
- , an arbitrary-precision range analysis C library.
Interfaces for
- The following C++ interfaces for , very different in their design (and in particular, in the strategies for intermediate precisions, so that they can yield different results), are available:
- MPFRCPP, written by Alexey V. Beshenov. This interface uses a modern C++ design with using of classes, templates and function objects.
- Another C++ wrapper, written by Pavel Holoborodko. The precision of the temporary results in an expression is chosen as the maximum precision of its arguments, and the final result is rounded to the precision of the target variable.
- The mpfr::real class, written by Christian Schneider.
It consists of a template class with precision and rounding mode passed as template arguments. Hence, effectively a new type will be created for each precision and rounding that is used. All the operators available for fundamental floating point types as well as type conversions from and to other types, and the set of mathematical functions known from math.h/cmath are implemented. This should allow for an easy substitution of, e.g., a double with the wrapper class in most cases.
- The gmpfrxx C++ interface for both and , written by Jon Wilkening.
- Boost also includes an interface for , as part of its Multiprecision library.
- Ada:
- - a Fortran binding for .
- Haskell interfaces: hmpfr written by Aleš Bizjak and haskell-mpfr.
- Java bindings to .
- A interface, written by Richard Fateman. This package also contains a implementation.
- .NET interface Math.Mpfr.Native.
- OCaml:
- PariTwine, a glue library between PARI/GP and some other mathematics libraries, including .
- The Perl interface Math::MPFR.
- Python:
- R interface to .
- The Racket language includes an interface.
- The RandomLib interface (C++ classes).
- Ruby bindings for and .
- Rust interface to , and .
Software Using
- The calculator Abakus by Michael Pyne (supporting arbitrary precision thanks to as of version 0.90).
- 2, a set of Haskell packages for exact real number computation: aern2-mp (multi-precision floats via ) and aern2-real (exact real numbers via Cauchy sequences and ).
- The ALGLIB.NET project implements multiple-precision linear algebra using .
- The library, dedicated to the static analysis of the numerical variables of a program by Abstract Interpretation.
- The virtual machine as of version 0.9.12, for the emulation.
- Arb, a C library for arbitrary-precision floating-point ball arithmetic, developed by Fredrik Johansson.
- Ariadne, a C++ library for formal verification of cyber-physical systems, using reachability analysis for nonlinear hybrid automata.
- The numerical analysis library BNCpack can be compiled with .
- (Computational Geometry Algorithms Library).
- DateTime-Astro (functions for astronomical calendars).
- Eigen, a C++ template library for linear algebra, via Pavel Holoborodko's C++ wrapper.
- (Fast Library for Number Theory).
- is also used by the Fluctuat tool developed and used internally at the (France).
- FractalNow, a fractal generator.
- , a tool intended to help verifying and formally proving properties on numerical programs, by Guillaume Melquiond.
- : first in GFortran, then in the middle-end phase as of 4.3, to resolve math functions with constant arguments. More information.
- GDB optionally uses to emulate target floating-point arithmetic (documentation).
- Genius Math Tool and the language, by Jiri Lebl.
- Giac/Xcas, a free computer algebra system, by Bernard Parisse.
- Calculator, as of version 3.15.4.
- Awk, as of version 4.1.0 (for optional arbitrary-precision arithmetic).
- Herbie, a tool for improving the accuracy of floating-point expressions.
- The iRRAM - Exact Arithmetic in C++ implementation from Norbert Müller (University of Trier, Germany).
- The Julia language implementation (source).
- The ledger accounting system.
- The C++ continued fractions toolkit libcff (no longer maintained), by Johan Vervloet.
- The libieeep1788 library, a C++ implementation of the preliminary P1788 standard for interval arithmetic.
- LLVM, for its tests of some math functions.
- Macaulay2, a software system devoted to supporting research in algebraic geometry and commutative algebra (as of version 1.1).
- The Magma computational algebra system.
- The Maple computer algebra system via the library, since version 11 (reference).
- Mathemagix, a free computer algebra system, in the numerix package.
- /libivl (computational algebra and plot system / interval computations library), by Mateusz Paprocki.
- MetaLibm (code generators for the math library and beyond).
- MPACK (multiple precision arithmetic and ), by Nakata Maho, supports as of version 0.6.5 (2010-05-21).
- The MPFRCX library for the arithmetic of univariate polynomials over arbitrary precision real () or complex () numbers, without control on the rounding.
- The mpfs library, an experiment in stochastic lazy floating-point arithmetic, from Keith Briggs. Note: mpfs-0.9 (last updated in 2006, and the latest version at the time of writing [2018-09-25]) will not work unmodified with recent versions.
- MPFUN2015, an arbitrary precision package by David H. Bailey; the MPFUN-MPFR version is based on .
- Multiprecision Computing Toolbox for MATLAB.
- , an experimental interpreter, has datatypes for multiple-precision floating-point numbers via .
- The Octave interval package.
- ODE-Playground: Solve s using arbitrary order Taylor Series Method to arbitrary precision and analyze functions using Automatic Differentiation.
- Protea, a software devoted to protein-coding sequences identification, by Arnaud Fontaine and Hélène Touzet.
- The Rasqal Query Library optionally uses for accurate xsd:decimal implementation.
- ReactOS Calc uses when multiple-precision support is enabled.
- is one of the components of .
- (Stochastic Arithmetic in Multiprecision).
- , a library for computing homotopy continuation of a given root of one-dimensional sections of bivariate complex polynomials.
- Smooth, an arbitrary-precision differentiable programming language.
- Soft84, a calculator for Android devices.
- Sollya, a tool environment for safe floating-point code development, written by Christoph Lauter and Sylvain Chevillard (in the old Arénaire project).
- SXEmacs can be compiled with support (as of version 22.1.3).
- SweeD, a tool that implements a composite likelihood ratio test for detecting selective sweeps.
- : a Taylor Integrator for Differential Equations, to integrate numerically Ordinary Differential Equations in arbitrary precision.
- TRIP, a general computer algebra system dedicated to celestial mechanics.
- Verificarlo, a tool for automatic Monte-Carlo arithmetic analysis.
- The Wcalc calculator by Kyle Wheeler (supporting arbitrary precision thanks to as of version 2.0).
- ZKCM, a C++ library for multi-precision complex-number matrix calculations.
Other Related Free Software
- MAPM, a portable arbitrary precision math library in C, by Michael C. Ring (and a fork on GitHub).
- , a Complex interval Standard functions Library developed by Markus Neher (Karlsruhe).
- XSC-Languages (C-XSC, PASCAL-XSC), FI_LIB and FILIB++, and intpakX software developed at University of Wuppertal (Germany).
- The CORE library: a library for robust numerical and geometric computation.
- The IBM Accurate Portable Mathlib library (2001), which provides correct rounding in double precision for rounding to nearest. It implements
atan, atan2, asin, acos, exp, log, pow, sin, cos, tan, sqrt, remainder.
- The C++ library ().
- The Quad-Double package by David Bailey, Yozo Hida and Sherry Li.
- The numerical difference utility from Nelson Beebe, similar to diff but for numerical files.
- The mpmath Python library for arbitrary-precision floating-point arithmetic.
- The Constructive Reals Calculator from Hans Boehm.
- The - exact reals in C from Keith Briggs.
- The precise computation software from Oliver Aberth.
- The
RR class from , which implements a smooth extension
of floating point to arbitrary precision and guarantees a platform-independent behaviour.
- A continued-fraction package based on , by François Balsalobre.
- Software developed in the old Arénaire project and no longer maintained:
- , a fast and lightweight multiple-precision library supporting the four arithmetic operations; the precision (210 bits by default) is fixed at compile time;
- CRlibm, a correctly rounded elementary function library (which has been superseded by MetaLibm, developed in other teams).
- Sun's libmcr, a correctly rounded library of basic double-precision transcendental elementary functions.
- The PreciseFloating (floating-point arithmetic library) project in Java, by Daniel Aioanei: directed rounding, rational arithmetic and arbitrary precision arithmetic based on regular continued fraction expansions.
- The decNumber package by Mike Cowlishaw (): arbitrary-precision decimal arithmetic.
- The Intel® Decimal Floating-Point Math Library for the IEEE 754-2008 Standard (download).
- The calc calculator by Landon Curt Noll. This calculator implements a rational arithmetic, with a fallback to some kind of multiple-precision fixed-point arithmetic (integer multiplied by a configurable epsilon).
- The Qalculate calculator by Niklas Knutsson, based on .
- The MathCW mathematical function library (supporting binary and decimal floating-point arithmetic) by Nelson H. F. Beebe.
- Libraries for extended precision on : gnuprec.
- The mpdecimal package for correctly rounded arbitrary-precision decimal floating-point arithmetic, by Stefan Krah.
- : multiple precision arithmetic routines for s (based on floating-point expansions), written in C.
- - Algorithmic 'n Analytic Number Theory by Linas Vepstas.
- MikeMcl/bignumber.js, a JavaScript library for arbitrary-precision decimal and non-decimal arithmetic.
- The LibBF library by Fabrice Bellard.
- The CORE-MATH project, which provides correctly rounded mathematical functions.
Related References and Links