---
title: "MPFR — paper by Fousse et al. (2007) · ACM TOMS 33(2), art. 13"
description: "The authors present MPFR, an ISO C library built on the GNU MP (GMP) mpn layer and released… 42 references, cited by 18 papers here."
authors: ["Laurent Fousse", "Guillaume Hanrot", "Vincent Lefèvre", "Patrick Pélissier", "Paul Zimmermann"]
year: 2007
venue: "ACM TOMS 33(2), art. 13"
source: "https://memsic.ccsd.cnrs.fr/INPL/inria-00070266v1"
licence: "author's copy — read only"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/en/papers/fousse-2007-mpfr-multiple-precision-binary-floating/"
---
[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/fousse-2007-mpfr-multiple-precision-binary-floating/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2007](https://md.research.elamur.ai/free/en/papers/2007/page/2/) / MPFR: a multiple-precision binary floating-point library with correct rounding

# MPFR: a multiple-precision binary floating-point library with correct rounding

**Authors:** Laurent Fousse, Guillaume Hanrot, Vincent Lefèvre, Patrick Pélissier and Paul Zimmermann · **Year:** 2007 · **Venue:** ACM TOMS 33(2), art. 13 · **Licence:** author's copy — read only

**Links:** [Publisher's page](https://memsic.ccsd.cnrs.fr/INPL/inria-00070266v1) · [PDF](https://perso.ens-lyon.fr/guillaume.hanrot/Papers/toms.pdf)

**Citations:** [18](https://md.research.elamur.ai/free/en/papers/fousse-2007-mpfr-multiple-precision-binary-floating/cited-by/) in our library, of the 149,439 papers whose bibliographies we read

## Summary
Arbitrary-precision floating-point packages such as GMP's MPF, CLN and PARI typically lack precise semantics. Their outputs can shift whenever an internal algorithm changes, which undermines portability and makes correctness proofs impossible. The authors present MPFR, an ISO C library built on the GNU MP (GMP) mpn layer and released under the LGPL. It carries the guarantees of IEEE 754 over to arbitrary precision. Every variable carries its own binary precision, and each operation or mathematical function returns the exact result rounded correctly to the target variable's precision in the requested direction. Exceptions are also supported. The library uses radix 2 so that results are identical on 32- and 64-bit machines and so that the IEEE single, double and quadruple formats can be emulated. Benchmarks show that this rigor comes with little or no speed penalty relative to competing libraries, and MPFR is often faster. The authors also document misrounded results from other packages. MPFR matters because programs built on it inherit well-defined, reproducible arithmetic, and it already supports compilers, computer algebra systems and rigorous mathematical computations.

## Key points
- Each MPFR call returns a ternary "inexact flag" whose sign shows whether the stored result lies below, above or exactly at the true value. Precision can range from 2 bits up to whatever memory allows.
- Mantissas are stored as arrays of GMP limbs with a leading bit always set. The format has no subnormals and no implicit bit, and unused low-order bits are zero, so a p-bit number uses exactly p bits.
- Table II reports incorrectly rounded 53-bit results from NTL 5.4, PARI 2.2.12.beta and CLN 1.1.11. One example is a PARI tan x value that is off by about 8.245 ulp.
- Companion tools include MPFI (interval arithmetic), MPFR++ (a C++ interface), MPC (complex numbers with 16 rounding modes) and MPCHECK (a tester for fixed-precision math libraries).
- Users include gfortran in GCC-4.0 (for constant folding), Magma, CGAL, a guaranteed LLL implementation, the Fluctuat static analyzer, and rigorous computations of Maass cusp forms and checks of Artin's conjecture.

*Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.*

📚 Shelves (1): [➗ Mathematics](https://md.research.elamur.ai/free/en/shelves/mathematics/) · 233 works

## Cite

Cite as: Laurent Fousse, Guillaume Hanrot, Vincent Lefèvre, Patrick Pélissier and Paul Zimmermann. 2007. MPFR: a multiple-precision binary floating-point library with correct rounding. ACM TOMS 33(2), art. 13.

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{fousse2007mpfr,
  title = {{MPFR: a multiple-precision binary floating-point library with correct rounding}},
  author = {Laurent Fousse, Guillaume Hanrot, Vincent Lefèvre, Patrick Pélissier and Paul Zimmermann},
  booktitle = {ACM TOMS 33(2), art. 13},
  year = {2007},
  url = {https://memsic.ccsd.cnrs.fr/INPL/inria-00070266v1}
}
```

- [← previous Semi-automatic error analysis for large-scale statistical machine translation](https://md.research.elamur.ai/free/en/papers/kirchhoff-2007-semi-automatic-error-analysis-large/)
- [next → Integration of an Arabic Transliteration Module into a Statistical Machine Translation System](https://md.research.elamur.ai/free/en/papers/kashani-2007-integration-arabic-transliteration-module-into/)
- [↑ back to papers of 2007](https://md.research.elamur.ai/free/en/papers/2007/page/2/)

## References

42 references, 0 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

1. Batut, C., Belabas, K., Bernardi, D., Cohen, H., and Olivier, M. 2000. User’s Guide to PARI/GP. [http://pari.math.u-bordeaux.fr/pub/pari/manuals/2.1.6/users.pdf](http://pari.math.u-bordeaux.fr/pub/pari/manuals/2.1.6/users.pdf). [↗](http://pari.math.u-bordeaux.fr/pub/pari/manuals/2.1.6/users.pdf)
2. Booker, A. R. 2005. Artin’s conjecture, Turing’s method and the Riemann hypothesis. http://www.arxiv.org/abs/math.NT/0507502. 37 pages. — [arXiv:math.nt/0507502](https://arxiv.org/abs/math.nt/0507502) [↗](http://www.arxiv.org/abs/math.NT/0507502)
3. Booker, A. R., Strömbergsson, A., and Venkatesh, A. 2006. Effective computation of Maass cusp forms. [http://www.math.uu.se/](http://www.math.uu.se/) ∼ astrombe/papers/papers.html. Preprint. 29 pages. [↗](http://www.math.uu.se/)
4. Brent, R. P. 1978. A Fortran multiple-precision arithmetic package. ACM Trans. Math. Softw. 4, 1, 57–70. [find](https://scholar.google.com/scholar?q=Brent%2C+R%2E+P%2E+1978%2E+A+Fortran+multiple%2Dprecision+arithmetic+package%2E+ACM+Trans%2E+Math%2E+Softw%2E+4%2C+1%2C+57%E2%80%9370%2E)
5. Brent, R. P. 1981a. An idealist’s view of semantics for integer and real types. Technical Report TR-CS-81-14, Australian National University, 12 pages. [find](https://scholar.google.com/scholar?q=Brent%2C+R%2E+P%2E+1981a%2E+An+idealist%E2%80%99s+view+of+semantics+for+integer+and+real+types%2E+Technical+Report+TR%2DCS%2D81%2D14%2C+Australian+National+University%2C+12+pages%2E)
6. Brent, R. P. 1981b. MP user’s guide. Technical Report TR-CS-81-08, Australian National University. 4th edition. 73 pages. [find](https://scholar.google.com/scholar?q=Brent%2C+R%2E+P%2E+1981b%2E+MP+user%E2%80%99s+guide%2E+Technical+Report+TR%2DCS%2D81%2D08%2C+Australian+National+University%2E+4th+edition%2E+73+pages%2E)
7. Char, B. W., Geddes, K. O., Gonnet, G. H., Leong, B. L., Monagan, M. B., and Watt, S. M. 1991. Maple V: Language Reference Manual. Springer-Verlag. [find](https://scholar.google.com/scholar?q=Char%2C+B%2E+W%2E%2C+Geddes%2C+K%2E+O%2E%2C+Gonnet%2C+G%2E+H%2E%2C+Leong%2C+B%2E+L%2E%2C+Monagan%2C+M%2E+B%2E%2C+and+Watt%2C+S%2E+M%2E+1991%2E+Maple+V%3A+Language+Reference+Manual%2E+Springer%2DVerlag%2E)
8. Clinger, W. D. 1990. How to read floating point numbers accurately. In Proceedings of the ACM SIGPLAN’90 Conference on Programming Language Design and Implementation. White Plains, NY, 92–101. [find](https://scholar.google.com/scholar?q=Clinger%2C+W%2E+D%2E+1990%2E+How+to+read+floating+point+numbers+accurately%2E+In+Proceedings+of+the+ACM+SIGPLAN%E2%80%9990+Conference+on+Programming+Language+Design+and+Implementation%2E+White+Plains%2C+NY%2C+92%E2%80%93101%2E)
9. Collins, G. E. and Krandick, W. 2000. Multiprecision floating point addition. In Proceedings of the 2000 International Symposium on Symbolic and Algebraic Computation (ISSAC’2000), C. Traverso, Ed. ACM Press, 71–77. [find](https://scholar.google.com/scholar?q=Collins%2C+G%2E+E%2E+and+Krandick%2C+W%2E+2000%2E+Multiprecision+floating+point+addition%2E+In+Proceedings+of+the+2000+International+Symposium+on+Symbolic+and+Algebraic+Computation+%28ISSAC%E2%80%992000%29%2C+C%2E+Traverso%2C+Ed%2E+AC)
10. Cowlishaw, M. 2005. The decNumber C library, 3.32 ed. IBM UK Laboratories. 55 pages. [find](https://scholar.google.com/scholar?q=Cowlishaw%2C+M%2E+2005%2E+The+decNumber+C+library%2C+3%2E32+ed%2E+IBM+UK+Laboratories%2E+55+pages%2E)
11. Cuyt, A., Kuterna, P., Verdonk, B., and Vervloet, J. 2001. Arithmos: a reliable integrated computational environment. [http://www.cant.ua.ac.be/arithmos/index.html](http://www.cant.ua.ac.be/arithmos/index.html). de Dinechin, F., Ershov, A. V., and Gast, N. 2005. Towards the post-ultimate libm. In Proceedings of 17th IEEE Symposium on Computer Ari… [↗](http://www.cant.ua.ac.be/arithmos/index.html)
12. Defour, D., Hanrot, G., Lefèvre, V., Muller, J.-M., Revol, N., and Zimmermann, P. 2004. Proposal for a standardization of mathematical function implementation in floating-point arithmetic. Numerical Algorithms 37, 1-4, 367–375. [find](https://scholar.google.com/scholar?q=Defour%2C+D%2E%2C+Hanrot%2C+G%2E%2C+Lefe%CC%80vre%2C+V%2E%2C+Muller%2C+J%2E%2DM%2E%2C+Revol%2C+N%2E%2C+and+Zimmermann%2C+P%2E+2004%2E+Proposal+for+a+standardization+of+mathematical+function+implementation+in+floating%2Dpoint+arithmetic%2E+Numerical+)
13. Gay, D. M. 1990. Correctly rounded binary-decimal and decimal-binary conversions. Numerical Analysis Manuscript 90-10, AT&T Bell Laboratories. [find](https://scholar.google.com/scholar?q=Gay%2C+D%2E+M%2E+1990%2E+Correctly+rounded+binary%2Ddecimal+and+decimal%2Dbinary+conversions%2E+Numerical+Analysis+Manuscript+90%2D10%2C+AT%26T+Bell+Laboratories%2E)
14. Goubault, E. 2001. Static analyses of the precision of floating-point operations. In Proceedings of SAS’01. Lecture Notes in Computer Science, vol. 2126. Springer-Verlag, 234–259. [find](https://scholar.google.com/scholar?q=Goubault%2C+E%2E+2001%2E+Static+analyses+of+the+precision+of+floating%2Dpoint+operations%2E+In+Proceedings+of+SAS%E2%80%9901%2E+Lecture+Notes+in+Computer+Science%2C+vol%2E+2126%2E+Springer%2DVerlag%2C+234%E2%80%93259%2E)
15. Granlund, T. 2004. GNU MP: The GNU Multiple Precision Arithmetic Library, 4.1.4 ed. [http://www.swox.se/gmp/](http://www.swox.se/gmp/). [↗](http://www.swox.se/gmp/)
16. Hack, M. 2004. On intermediate precision required for correctly-rounding decimal-to-binary floating-point conversion. In Proceedings of 6th Conference Real Numbers and Computers (RNC’6). Schloss Dagstuhl, Germany. [find](https://scholar.google.com/scholar?q=Hack%2C+M%2E+2004%2E+On+intermediate+precision+required+for+correctly%2Drounding+decimal%2Dto%2Dbinary+floating%2Dpoint+conversion%2E+In+Proceedings+of+6th+Conference+Real+Numbers+and+Computers+%28RNC%E2%80%996%29%2E+Schloss+Dagst)
17. Haible, B. and Kreckel, R. 2005. CLN, a class library for numbers. [http://www.ginac.de/CLN/](http://www.ginac.de/CLN/). Version 1.1.11. [↗](http://www.ginac.de/CLN/)
18. Haible, B. and Papanikolaou, T. 1997. Fast multiprecision evaluation of series of rational numbers. Technical Report TI-7/97, Darmstadt University of Technology. [find](https://scholar.google.com/scholar?q=Haible%2C+B%2E+and+Papanikolaou%2C+T%2E+1997%2E+Fast+multiprecision+evaluation+of+series+of+rational+numbers%2E+Technical+Report+TI%2D7%2F97%2C+Darmstadt+University+of+Technology%2E)
19. Hanrot, G., Lefèvre, V., Pélissier, P., and Zimmermann, P. 2005. The MPFR library. [http://www.mpfr.org/](http://www.mpfr.org/). Version 2.2.0. [↗](http://www.mpfr.org/)
20. Hull, T. E. 1978. Desirable floating-point arithmetic and elementary functions for numerical computation. In Proceedings of the 4th IEEE Symposium on Computer Arithmetic (Arith’4). 63–69. [find](https://scholar.google.com/scholar?q=Hull%2C+T%2E+E%2E+1978%2E+Desirable+floating%2Dpoint+arithmetic+and+elementary+functions+for+numerical+computation%2E+In+Proceedings+of+the+4th+IEEE+Symposium+on+Computer+Arithmetic+%28Arith%E2%80%994%29%2E+63%E2%80%9369%2E)
21. IEEE 1985. IEEE standard for binary floating-point arithmetic. ANSI/IEEE Std 754-1985. [find](https://scholar.google.com/scholar?q=IEEE+1985%2E+IEEE+standard+for+binary+floating%2Dpoint+arithmetic%2E+ANSI%2FIEEE+Std+754%2D1985%2E)
22. ACM Journal Name, Vol. V, No. N, Month 20YY. [find](https://scholar.google.com/scholar?q=ACM+Journal+Name%2C+Vol%2E+V%2C+No%2E+N%2C+Month+20YY%2E)
23. Kahan, W. 1996. Lecture notes on the status of IEEE standard 754 for binary floating-point arithmetic. [http://http.cs.berkeley.edu/](http://http.cs.berkeley.edu/) ∼ wkahan/ieee754status/ieee754.ps. 30 pages. [↗](http://http.cs.berkeley.edu/)
24. Krandick, W. and Johnson, J. R. 1993. Efficient multiprecision floating point multiplication with optimal directional rounding. In Proceedings of the 11th IEEE Symposium on Computer Arithmetic (Arith’11). Windsor, Ontario. [find](https://scholar.google.com/scholar?q=Krandick%2C+W%2E+and+Johnson%2C+J%2E+R%2E+1993%2E+Efficient+multiprecision+floating+point+multiplication+with+optimal+directional+rounding%2E+In+Proceedings+of+the+11th+IEEE+Symposium+on+Computer+Arithmetic+%28Arith%E2%80%99)
25. Kreinovich, V. and Rump, S. 2006. Towards optimal use of multi-precision arithmetic: A remark. [http://www.ti3.tu-harburg.de/](http://www.ti3.tu-harburg.de/) ∼ rump/. 4 pages. [↗](http://www.ti3.tu-harburg.de/)
26. Lefèvre, V. 2004. The generic multiple-precision floating-point addition with exact rounding (as in the MPFR library). In Proceedings of 6th Conference on Real Numbers and Computers (RNC’6). Schloss Dagstuhl, Germany. [find](https://scholar.google.com/scholar?q=Lefe%CC%80vre%2C+V%2E+2004%2E+The+generic+multiple%2Dprecision+floating%2Dpoint+addition+with+exact+rounding+%28as+in+the+MPFR+library%29%2E+In+Proceedings+of+6th+Conference+on+Real+Numbers+and+Computers+%28RNC%E2%80%996%29%2E+Schloss+)
27. Mulders, T. 2000. On short multiplications and divisions. AAECC 11, 1, 69–88. [find](https://scholar.google.com/scholar?q=Mulders%2C+T%2E+2000%2E+On+short+multiplications+and+divisions%2E+AAECC+11%2C+1%2C+69%E2%80%9388%2E)
28. Muller, J.-M. 2005. Elementary Functions. Algorithms and Implementation, 2nd ed. Birk-häuser. [find](https://scholar.google.com/scholar?q=Muller%2C+J%2E%2DM%2E+2005%2E+Elementary+Functions%2E+Algorithms+and+Implementation%2C+2nd+ed%2E+Birk%2Dha%CC%88user%2E)
29. Müller, N. T. 1997. Towards a real RealRAM: a prototype using C++. In Proc. 6th International Conference on Numerical Analysis. Plovdiv. [find](https://scholar.google.com/scholar?q=Mu%CC%88ller%2C+N%2E+T%2E+1997%2E+Towards+a+real+RealRAM%3A+a+prototype+using+C%2B%2B%2E+In+Proc%2E+6th+International+Conference+on+Numerical+Analysis%2E+Plovdiv%2E)
30. Nguyen, P. and Stehlé, D. 2005. Floating-point LLL revisited. In Proceedings of Eurocrypt 2005. Lecture Notes in Computer Science, vol. 3494. Springer-Verlag, 215–233. [find](https://scholar.google.com/scholar?q=Nguyen%2C+P%2E+and+Stehle%CC%81%2C+D%2E+2005%2E+Floating%2Dpoint+LLL+revisited%2E+In+Proceedings+of+Eurocrypt+2005%2E+Lecture+Notes+in+Computer+Science%2C+vol%2E+3494%2E+Springer%2DVerlag%2C+215%E2%80%93233%2E)
31. Priest, D. M. 1991. Algorithms for arbitrary precision floating point arithmetic. In Proceedings of the 10th Symposium on Computer Arithmetic, P. Kornerup and D. Matula, Eds. IEEE Computer Society Press, Grenoble, France, 132–144. [find](https://scholar.google.com/scholar?q=Priest%2C+D%2E+M%2E+1991%2E+Algorithms+for+arbitrary+precision+floating+point+arithmetic%2E+In+Proceedings+of+the+10th+Symposium+on+Computer+Arithmetic%2C+P%2E+Kornerup+and+D%2E+Matula%2C+Eds%2E+IEEE+Computer+Society+Pre)
32. Revol, N. and Rouillier, F. 2005. MPFI, a multiple precision interval arithmetic library based on MPFR. [http://mpfi.gforge.inria.fr/](http://mpfi.gforge.inria.fr/). [↗](http://mpfi.gforge.inria.fr/)
33. Shoup, V. 2005. NTL: A library for doing number theory. [http://www.shoup.net/ntl/](http://www.shoup.net/ntl/). Version 5.4. [↗](http://www.shoup.net/ntl/)
34. Smith, D. M. 1991. Algorithm 693. a Fortran package for floating-point multiple-precision arithmetic. ACM Trans. Math. Softw. 17, 2, 273–283. [find](https://scholar.google.com/scholar?q=Smith%2C+D%2E+M%2E+1991%2E+Algorithm+693%2E+a+Fortran+package+for+floating%2Dpoint+multiple%2Dprecision+arithmetic%2E+ACM+Trans%2E+Math%2E+Softw%2E+17%2C+2%2C+273%E2%80%93283%2E)
35. Sofroniou, M. and Spaletta, G. 2005. Precise numerical computation. Journal of Logic and Algebraic Programming. Special Issue on Practical Development of Exact Real Number Computation 64, 1, 113–134. [find](https://scholar.google.com/scholar?q=Sofroniou%2C+M%2E+and+Spaletta%2C+G%2E+2005%2E+Precise+numerical+computation%2E+Journal+of+Logic+and+Algebraic+Programming%2E+Special+Issue+on+Practical+Development+of+Exact+Real+Number+Computation+64%2C+1%2C+113%E2%80%93134%2E)
36. Steele, G. L. and White, J. L. 1990. How to print floating-point numbers accurately. In Proceedings of the ACM SIGPLAN’90 Conference on Programming Language Design and Implementation. White Plains, NY, 112–126. [find](https://scholar.google.com/scholar?q=Steele%2C+G%2E+L%2E+and+White%2C+J%2E+L%2E+1990%2E+How+to+print+floating%2Dpoint+numbers+accurately%2E+In+Proceedings+of+the+ACM+SIGPLAN%E2%80%9990+Conference+on+Programming+Language+Design+and+Implementation%2E+White+Plains%2C+NY)
37. Steele, G. L. and White, J. L. 2003. How to print floating-point numbers accurately. In 20 Years of the ACM/SIGPLAN Conference on Programming Language Design and Implementation (1979-1999): A Selection. Retrospective. 3 pages. [find](https://scholar.google.com/scholar?q=Steele%2C+G%2E+L%2E+and+White%2C+J%2E+L%2E+2003%2E+How+to+print+floating%2Dpoint+numbers+accurately%2E+In+20+Years+of+the+ACM%2FSIGPLAN+Conference+on+Programming+Language+Design+and+Implementation+%281979%2D1999%29%3A+A+Selectio)
38. Sun Microsystems. 2004. Libmcr 0.9 beta: A reference correctly-rounded library of basic double-precision transcendental elementary functions. [http://www.sun.com/download/products.xml?id=41797765](http://www.sun.com/download/products.xml?id=41797765). [↗](http://www.sun.com/download/products.xml?id=41797765)
39. The Arenaire project. 2005. CR-Libm, a library of correctly rounded elementary functions in double-precision. [http://lipforge.ens-lyon.fr/projects/crlibm/](http://lipforge.ens-lyon.fr/projects/crlibm/). Version 0.8. [↗](http://lipforge.ens-lyon.fr/projects/crlibm/)
40. Verdonk, B., Cuyt, A., and Verschaeren, D. 2001. A precision- and range-independent tool for testing floating-point arithmetic I: Basic operations, square root, and remainder. ACM Trans. Math. Softw. 27, 1, 92–118. [find](https://scholar.google.com/scholar?q=Verdonk%2C+B%2E%2C+Cuyt%2C+A%2E%2C+and+Verschaeren%2C+D%2E+2001%2E+A+precision%2D+and+range%2Dindependent+tool+for+testing+floating%2Dpoint+arithmetic+I%3A+Basic+operations%2C+square+root%2C+and+remainder%2E+ACM+Trans%2E+Math%2E+Softw%2E+)
41. Wolfram, S. 1996. The Mathematica Book , 3rd ed. Cambridge University Press. [find](https://scholar.google.com/scholar?q=Wolfram%2C+S%2E+1996%2E+The+Mathematica+Book+%2C+3rd+ed%2E+Cambridge+University+Press%2E)
42. Ziv, A. 1991. Fast evaluation of elementary mathematical functions with correctly rounded last bit. ACM Trans. Math. Softw. 17, 3, 410–423. [find](https://scholar.google.com/scholar?q=Ziv%2C+A%2E+1991%2E+Fast+evaluation+of+elementary+mathematical+functions+with+correctly+rounded+last+bit%2E+ACM+Trans%2E+Math%2E+Softw%2E+17%2C+3%2C+410%E2%80%93423%2E)

*Updated 3 November 2026*
