MPFR Floating-Point Arithmetic Library

MPFR Floating-Point Arithmetic Library

www.mpfr.org

3

About this website

MPFR (Multiple Precision Floating-Point Reliable) is a C library for multiple-precision floating-point computations with correct rounding. Developed since 2000 by the Spaces team (Gaelle Vanaret, Guillaume Hanrot, Vincent Lefevre, Patrick Pelissier, Philippe Theveny, and Paul Zimmermann) at INRIA, MPFR extends GMP to provide floating-point arithmetic with guaranteed correct results. Key features: arbitrary-precision floating-point arithmetic where the user can specify the desired precision (number of bits) for each computation, from very low (a few bits) to very high (millions of bits) with no practical limit beyond memory. IEEE 754 compliance with correct rounding for all operations including division, square root, and transcendental functions, following the four rounding modes: round to nearest even, round toward zero, round toward plus infinity, round toward minus infinity. Comprehensive transcendental and special functions including exponential, logarithm, power, trigonometric (sine, cosine, tangent, and inverse), hyperbolic, error function, gamma, zeta, Bessel functions, and more, all with guaranteed correct rounding. Special values handling including infinities, NaN (Not a Number), signed zeros, and subnormal numbers. Exception flags tracking including invalid operation, division by zero, overflow, underflow, and inexact. Thread-safe design for multi-threaded applications. Based on GMP for integer operations, providing seamless integration. Portable C code with optimized assembly for major architectures. Used by SageMath, MPFI, MPC (multiple-precision complex), and numerous scientific computing applications. Critical for applications requiring guaranteed numerical accuracy such as cryptography, computational geometry, and formal verification. Open source under LGPL.

Tags & Categories

Statistics

3
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!