FLINT3.7.0-dev
Overview

Floating-point arithmetic

This section describes how FLINT implements floating-point arithmetic outside the arb ball arithmetic (which has its own group, Ball arithmetic): the fixed-precision nfloat type and its kernels, the limb-level mp_real balls and their elementary functions, constants and hypergeometric series, double-word to quad-double expansions and balls in dfloat, and interval arithmetic with doubles. Start with the overview, which compares all floating-point types in FLINT and says which to use.

In this section#

OverviewFloating-point arithmetic in FLINTA map of FLINT's floating-point types - arf and arb, nfloat, mp_real, decimal, dfloat and machine doubles - with what each represents, its precision range, whether it is rigorous, and which to use.AlgorithmFixed-precision floating point with nfloatHow nfloat gets its speed - a shallow fixed-size representation selected at run time, kernels specialised by the number of words, fixed-point accumulation for dot products, and fixed-point or exact integer matrix multiplication with rigorous scaling bounds.AlgorithmBall arithmetic with limb-granular radiiThe representation of mp_real balls, with the radius counted in ulps of the last limb and the mantissa length following the accuracy; how errors are bounded and installed, and what this costs compared with arb.AlgorithmElementary functions in mp_realHow mp_real evaluates exp, log, the trigonometric functions and their inverses from one limb to millions of limbs: argument reduction of balls, table-driven and dense-table kernels, bitwise (BKM-type) reduction with signed digits, rectangular splitting, bit-burst evaluation, Newton–Taylor inversion, the AGM logarithm, and sines of rational multiples of π.AlgorithmMulti-prime argument reductionReduction of exp and sin/cos arguments by integer combinations of logarithms of primes (or arguments of Gaussian primes) found from precomputed integer relations, with the logarithms computed by Machin-type formulas whose terms are summed by Zuniga's fast series.AlgorithmBinary splitting of hypergeometric series in mp_realThe general hypergeometric binary splitting of mp_real: exact leaves, removal of common factors, truncation near the root, rigorous tail bounds, transform reuse between the products of a merge and precomputed transforms of power tables, and parallelism.AlgorithmConstants in mp_realThe series and formulas behind the mp_real constants (π, log 2, e, Euler's constant, log 10, Catalan's constant, ζ(3), ζ(5), Γ(1/3), Γ(1/4)), the dual-number binary splitting for Euler's constant, and the cache of exact floors.AlgorithmDecimal floating-point arithmeticCorrectly rounded decimal arithmetic with limb-aligned exponents in radix 10^19: rounding with sticky bits, sums of far-apart operands, truncated products with interval rounding, division and square roots, decimal radii, conversions to and from binary, and correctly rounded functions by Ziv's strategy with detection of the hard cases.AlgorithmDouble-word and multi-double arithmeticError-free transformations, floating-point expansions of two to four doubles, their renormalisation, multiplication, long division and square roots, and how dfloat turns the dropped terms into rigorous ball radii.AlgorithmElementary functions in double-word to quad-double precisionTable-driven argument reduction, polynomials evaluated in several chains with tapered precision, and static error bounds for exp, log, sin, cos and atan on floating-point expansions, with the propagation of ball radii.AlgorithmInterval arithmetic with doublesFast rigorous enclosures with double endpoints computed in round-to-nearest mode and widened by a relative perturbation, with a proof that the widening is sufficient, and the mean value form used to bound integrands.
Cite this page

The FLINT team, “Floating-point arithmetic,” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/algorithms/floating-point/index.html (generated 2026-10-20).