📑 Table of Contents
GNU MPFR
DevelopersGNU Project (INRIA and others)
Initial releaseFebruary 4, 2000; 26 years ago (2000-02-04)
Stable release
4.2.2[1] / 20 March 2025; 14 months ago (20 March 2025)
Written inC
Operating systemCross-platform
TypeMathematical software
LicenseLGPL
Websitewww.mpfr.org Edit this on Wikidata
Repository

The GNU Multiple Precision Floating-Point Reliable Library (GNU MPFR) is a GNU portable C library for arbitrary-precision binary floating-point computation with correct rounding, based on GNU Multiple Precision Arithmetic Library.[2][3]

Library

edit

MPFR's computation is both efficient and has a well-defined semantics: the functions are completely specified on all the possible operands and the results do not depend on the platform.[4] This is done by copying the ideas from the ANSI/IEEE-754 standard for fixed-precision floating-point arithmetic (correct rounding and exceptions, in particular). More precisely, its main features are:

  • Support for special numbers: signed zeros (+0 and −0), infinities and not-a-number (a single NaN is supported: MPFR does not differentiate between quiet NaNs and signaling NaNs).
  • Each number has its own precision (in bits since MPFR uses radix 2). The floating-point results are correctly rounded to the precision of the target variable, in one of the five supported rounding modes (including the four from IEEE 754-1985).
  • Supported functions: MPFR implements all mathematical functions from C99 and other usual mathematical functions: the logarithm and exponential in natural base, base 2 and base 10, the log(1+x) and exp(x)−1 functions (log1p and expm1), the six trigonometric and hyperbolic functions and their inverses, the gamma, zeta and error functions, the arithmetic–geometric mean, the power (xy) function. All those functions are correctly rounded over their complete range.
  • Subnormal numbers are not supported, but can be emulated with the mpfr_subnormalize function.

MPFR is not able to track the accuracy of numbers in a whole program or expression; this is not its goal. Interval arithmetic packages like Arb,[5] MPFI,[6] or Real RAM implementations like iRRAM,[7] which may be based on MPFR, can do that for the user.

MPFR is dependent upon the GNU Multiple Precision Arithmetic Library (GMP).

MPFR is needed to build the GNU Compiler Collection (GCC).[8] Other software uses MPFR, such as ALGLIB, CGAL, FLINT, GNOME Calculator, the Julia language implementation, the Magma computer algebra system, Maple, GNU MPC, and GNU Octave.

See also

edit

References

edit
  1. ^ Vincent Lefèvre (20 March 2025). "Announce: GNU MPFR 4.2.2 is released". Retrieved 20 March 2025.
  2. ^ Fousse, L.; Hanrot, G.; Lefèvre, V.; Pélissier, P.; Zimmermann, P. (2007). "MPFR: A multiple-precision binary floating-point library with correct rounding". ACM Transactions on Mathematical Software. 33 (2): 13:1–15. doi:10.1145/1236463.1236468. S2CID 9641003.
  3. ^ Higham, Nick (October 8, 2015). "The Rise of Mixed Precision Arithmetic". Retrieved May 23, 2020.
  4. ^ "Frequently asked questions about MPFR: 1. What are the differences between MPF from GMP and MPFR?".
  5. ^ "Arb, a C library for arbitrary-precision ball arithmetic". Retrieved May 31, 2022.
  6. ^ "MPFI Project". GitLab at Inria. Retrieved May 31, 2022.
  7. ^ "iRRAM, a software library for exact real arithmetic". Retrieved May 31, 2022.
  8. ^ "GCC 4.3 Release Series: Changes, New Features, and Fixes". 2012-11-02. Retrieved September 25, 2013.

📚 Artikel Terkait di Wikipedia

C (programming language)

BLOPEX C mathematical functions Fastest Fourier Transform in the West GNU MPFR GNU Multiple Precision Arithmetic Library GNU Scientific Library hypre Integer

GNU Multiple Precision Arithmetic Library

result.get_str() ); return 0; } Free and open-source software portal GNU MPFR – library for arbitrary-precision computations with correct rounding, based

List of C++ multiple precision arithmetic libraries

incomplete list of some arbitrary-precision arithmetic libraries for C++. GMP MPFR MPIR TTMath Arbitrary Precision Math C++ Package Class Library for Numbers

DJGPP

35.1 GNU Bash 4.4 GNU Bison 2.4.1, Flex 2.5.4 GNU Emacs 29 GNU MPC 1.1.0, MPFR 4.1.0 It is also possible to use DJGPP to cross-compile software to DOS,

MPIR (mathematics software)

Precision Arithmetic Library GNU Multiple Precision Floating-Point Reliably (MPFR) Class Library for Numbers supporting GiNaC List of open-source mathematical

Gamma function

in most computer algebra systems, such as Mathematica and Maple. PARI/GP, MPFR and MPFUN contain free arbitrary-precision implementations. In some software

The C Programming Language

BLOPEX C mathematical functions Fastest Fourier Transform in the West GNU MPFR GNU Multiple Precision Arithmetic Library GNU Scientific Library hypre Integer

French Institute for Research in Computer Science and Automation

a medical image processing software, popularly used for MRI images. GNU MPFR, an arbitrary-precision floating-point library OpenViBE, a software platform