Generated by GPT-5-mini| MPFR | |
|---|---|
| Name | MPFR |
| Title | MPFR |
| Developer | Bruno Haible, Michael J. Fromberger, Nicolas Brisebarre, David M. Gay |
| Released | 1999 |
| Programming language | C (programming language) |
| Operating system | Unix, Linux, Windows, macOS |
| Platform | x86, ARM, PowerPC |
| Genre | Mathematical software, Numerical analysis |
| License | GNU Lesser General Public License |
MPFR MPFR is a C library for multiple-precision floating-point computations with exact rounding, designed to provide a reliable infrastructure for numerical software used in projects such as GNU Project, GNU Multiple Precision Arithmetic Library, and numerous scientific computing applications. It supports correct rounding according to several rounding modes used in standards like IEEE 754 and interoperates with compilers and tools including GCC, Clang (LLVM), and GMP (library). Developers in academia and industry employ it in contexts ranging from computational number theory to computer algebra systems.
MPFR implements arbitrary-precision floating-point arithmetic with specified precision and correct rounding, addressing needs identified by researchers at institutions such as INRIA, CNRS, and universities including University of California, Berkeley and École Polytechnique. It is often used alongside libraries and systems like MPIR, FLINT (software), SageMath, PARI/GP, and SymPy to ensure reproducible numerical results in environments where standard hardware floating-point (as in IEEE 754) is insufficient.
The library exposes features for directed rounding modes found in IEEE 754-2008 and supports precision control per operation, subnormal numbers, and exception flags analogous to those used by Intel, ARM Holdings, and IBM. It is designed to be portable across operating systems used in scientific computing clusters at institutions such as Lawrence Berkeley National Laboratory and CERN, integrating with build systems like Autoconf, Automake, and CMake. MPFR provides a well-documented API for arithmetic, transcendental functions, and comparison routines used by projects including R Project for Statistical Computing, Octave, and Julia (programming language).
The API is written in C (programming language) with bindings available for languages and systems such as Python (programming language), Haskell, Perl, Java (programming language), Ruby (programming language), and GNU Fortran. Typical usage patterns mirror interfaces used by GMP (library) with initialization, precision setting, arithmetic operations, and finalization, enabling integration in compilers like GCC and numeric libraries like Eigen (software). Developers working on projects such as Mathematica, Maple (software), and Maxima utilize these bindings to implement high-precision kernels.
MPFR builds atop GMP (library) or MPIR for multiprecision integer arithmetic and implements algorithms for addition, multiplication, division, rounding, and transcendental functions based on research from conferences like SODA (conference), ISSAC, and journals such as ACM Transactions on Mathematical Software. Its algorithms include divide-and-conquer multiplication, schoolbook methods for small sizes, and correctly rounded implementations for functions inspired by work from researchers at INRIA, Los Alamos National Laboratory, and CNRS. Implementations of special functions follow strategies developed in literature from NIST, SIAM Journal on Scientific Computing, and authors affiliated with ETH Zurich.
MPFR's performance characteristics depend on underlying hardware architectures from vendors like Intel, AMD, and ARM Holdings and on low-level optimizations that leverage instruction sets documented by Intel Corporation and ARM. Benchmarks often compare MPFR-based routines with hardware floating-point in environments such as Supercomputing (SC) conference demonstrations and in software stacks like OpenBLAS or FFTW. Accuracy guarantees are formalized to meet criteria discussed in IEEE 754 and in verification efforts associated with tools like Coq and ACL2, enabling confidence in results used by scientific projects at institutions such as NASA and European Space Agency.
Work on MPFR was initiated in the late 1990s by contributors including Bruno Haible and M. J. Fromberger, with collaborative input from developers known for contributions to GMP (library), David M. Gay, and others active in the free software community. Development has been influenced by numerical analysis research from groups at INRIA, CNRS, and universities like University of Cambridge and Massachusetts Institute of Technology. Over successive releases MPFR added features and widened platform support, collaborating with ecosystems around GNU Project tools and participating in outreach at events such as FOSDEM and Linux Foundation summits.
MPFR is distributed under the GNU Lesser General Public License which has facilitated its inclusion in GCC, SageMath, R Project for Statistical Computing, Octave, and many distributions such as Debian, Fedora, Ubuntu, and Arch Linux. Its licensing model encourages integration into both free software stacks and proprietary systems used by companies like Intel Corporation and research organizations including Lawrence Livermore National Laboratory. Adoption spans computer algebra systems, verification tools, cryptography libraries, and numerical packages used in projects at Microsoft Research, Google Research, and academic labs worldwide.
Category:Numerical analysis software Category:C (programming language) libraries