The MPFR Library
MPFR Links
Internal links:
External links on MPFR:
Introduction
The MPFR library is a C library for
multiple-precision floating-point computations with correct rounding.
MPFR has continuously been supported by the
INRIA and the current main
authors come from the
CACAO
and
Arénaire
project-teams at
Loria
(Nancy, France) and
LIP
(Lyon, France) respectively; see more on the
credit page.
MPFR is based on the
GMP
multiple-precision library.
The main goal of MPFR 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 ANSI/IEEE-754 standard for
double-precision floating-point arithmetic (53-bit mantissa).
MPFR is free. It is distributed under
the GNU
Lesser General Public License (GNU Lesser
GPL), version 2.1 or later.
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
MPFR, to make sure
MPFR is free for all its users. Unlike the
ordinary General Public License, the Lesser GPL enables
developers of non-free programs to use MPFR
in their programs. If you have written a new function for
MPFR or improved an existing one, please
share your work!
Interfaces for MPFR
- The following four C++ interfaces for MPFR,
very different in their design, are available:
- MPFRCPP,
written by Alexey V. Beshenov. This interface uses a modern C++ design
with using of classes, templates and function objects.
- MPFR++,
developed in the
Arénaire
project. Warning! The version currently available (2004-02-27) is not
up-to-date, is not compatible with the latest releases of
MPFR and has several bugs.
News from 2007-05-02: Changes have been done on this interface since,
but they are not published yet.
- The
gmpfrxx
C++ interface for both GMP and
MPFR, written by Jon Wilkening.
- The
Debian
package libmpfr-dev provides the mpfrxx.h
file. However it is quite old and very limited.
- The multiple-precision arithmetic is very useful for
interval
arithmetic. Get a multiple-precision interval arithmetic library
MPFI,
based on MPFR (note: due to
API and
internal changes in MPFR, you should
take MPFI 1.3.4-RC1 or above).
This library MPFI is developed by
Nathalie Revol from the
Arénaire
project and Fabrice Rouillier,
a former SPACES
member. This library implements basic operators {+,-,*,/} and the same
functions as MPFR {
sqrt,
exp, comparison functions, etc.}, except sine and cosine
functions applied on intervals. Read
more
explanations on Nathalie Revol's software page.
- The
MPC library
(alternative link),
a library for multiple-precision complex arithmetic with correct rounding,
based on the MPFR and
GMP
libraries.
- The Perl interface
Math::MPFR.
- A LISP
interface, written by Richard Fateman. This package also contains a
FFT implementation.
- The functional programming language
Ursala
includes an MPFR interface.
Software Using MPFR
- The KDE calculator
Abakus by Michael Pyne
(supporting arbitrary precision thanks to MPFR
as of version 0.90).
- The ALGLIB.NET project
implements multiple-precision linear algebra using
MPFR.
- The APRON
library, dedicated to the static analysis of the numerical variables
of a program by Abstract Interpretation.
- The numerical analysis library
BNCpack can be compiled
with MPFR.
- CGAL
(Computational Geometry Algorithms Library).
- Gappa,
a tool intended to help verifying and formally proving properties on
numerical programs, by Guillaume Melquiond.
- Genius Math Tool
and the GEL language,
by Jiri Lebl.
- GCC:
first in GFortran,
then in the middle-end phase
as of GCC 4.3,
to resolve
math functions with constant arguments.
More
information.
- Giac/Xcas,
a free computer algebra system, by Bernard Parisse.
- The iRRAM - Exact
Arithmetic in C++ implementation from Norbert Müller (University of
Trier, Germany).
- The C++ continued
fractions toolkit libcff by Johan Vervloet.
- Macaulay 2,
a software system devoted to supporting research in algebraic geometry and
commutative algebra (as of
version 1.1).
- The Magma
computational algebra system.
- The mpfs
library, an experiment in stochastic lazy floating-point arithmetic, from
Keith Briggs.
- MPFR is one of the components of
SAGE.
- Sollya,
a tool environment for safe floating-point code development,
written by Christoph Lauter and Sylvain Chevillard in the
Arénaire project.
- SXEmacs can be compiled
with MPFR support (as of version 22.1.3).
- The Wcalc
calculator by Kyle Wheeler (supporting arbitrary precision thanks
to MPFR as of version 2.0).
- MPFR is also used by the
Fluctuat
tool developed and used internally at the
CEA (France).
Other Related Free Software
- MAPM,
a portable arbitrary precision math library in C, by Michael C. Ring.
- CoStLy,
a Complex interval Standard functions Library developed by Markus Neher
(Karlsruhe).
- The
XSC-Languages,
FI_LIB, FILIB++ and intpak software developed at University of Wuppertal
(Germany).
- The Core library:
a library for robust numerical and geometric computation.
- The CLN
C++ library (GPL).
- 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 General Multiprecision PYthon
project: a GMP interface for the Python
language.
- The
Constructive
Reals Calculator from Hans Boehm.
- The
xrc
- exact reals in C from Keith Briggs.
- The precise
computation software from Oliver Aberth.
- The
RR class from
NTL,
which implements a smooth extension
of IEEE
floating point to arbitrary precision and guarantees a platform-independent
behaviour.
- A
continued-fraction
package based on GMP, by François
Balsalobre.
- SCSLib,
a fast and lightweight multiple-precision library supporting the
four arithmetic operations, developed in the
Arénaire project; the precision
(210 bits by default) is fixed at compile time.
CRlibm,
a correctly-rounded elementary function library.
- 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 (IBM): arbitrary-precision
decimal arithmetic.
- The Intel®
Decimal Floating-Point BID Library for the IEEE 754r Standard.
- 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
CLN.
Related References and Links