FLINT3.7.0-dev
Overview

Special functions

The sections below describe how FLINT evaluates special functions with rigorous error bounds, for real and complex balls and for power series: the elementary functions and constants of arf, nfloat, arb, acb and acf, the gamma and hypergeometric functions of arb_hypgeom and acb_hypgeom, the zeta and LL-functions of acb_dirichlet, the multiple zeta values, multiple polylogarithms and Epstein zeta functions of acb_mzeta, and the elliptic, modular and theta functions of acb_elliptic, acb_modular and acb_theta. Each section gives the formulas, the error bounds with proofs or references, the way the method and the working precision are chosen, and the functions that implement them. The overview explains the principles they share — truncation bounds, cancellation-aware precision, propagated error bounds, rectangular and binary splitting — and maps every function family to its methods.

OverviewEvaluating special functionsHow FLINT evaluates special functions with rigorous error bounds — the common principles (enclosures, error propagation, cancellation-aware working precision, argument reduction, convergent and asymptotic expansions, analytic continuation, caching) and a map of the methods to the functions and modules that use them.

The elementary functions and the constants underlie everything else: they are evaluated by the fixed-point kernels of mp_real, which arf, nfloat, arb, acb and acf wrap.

The sections on the gamma function and on hypergeometric functions describe the two main families of algorithms; those after them treat the special cases that need more than the general machinery.

In this section#

OverviewEvaluating special functionsHow FLINT evaluates special functions with rigorous error bounds — the common principles (enclosures, error propagation, cancellation-aware working precision, argument reduction, convergent and asymptotic expansions, analytic continuation, caching) and a map of the methods to the functions and modules that use them.AlgorithmElementary functionsHow FLINT evaluates exp, log, the trigonometric and hyperbolic functions and their inverses - the fixed-point kernels of mp_real (argument reduction, lookup tables, series, bit-burst evaluation, multi-prime reduction, Newton–Taylor inversion, the AGM) with their error bounds, and how arf, nfloat, arb, acb and acf wrap them.AlgorithmTable-based argument reductionThe kernels of the elementary functions from one limb to 600 limbs - table-driven evaluation in registers, dense tables of seven-bit reduction steps with exact one-limb multipliers, and bitwise (BKM-type) reduction with signed digits on vector lanes and the half-angle reconstruction of the sine and cosine.AlgorithmSeries evaluation and the bit-burst algorithmHow the elementary-function kernels evaluate the Taylor series of a reduced argument - rectangular splitting with tapered windows and integer coefficient chains, the chunked tangent series - and, at high precision, Brent's bit-burst algorithm and the table-free kernels that halve the argument.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.AlgorithmSines and cosines of rational multiples of πEvaluating cos(πR/Q), sin(πR/Q) and tan(πR/Q) as algebraic numbers - closed forms and half-angle steps by square roots, a Chebyshev step of arbitrary order with hypergeometric corrections that needs no division or square root, and the choice between these and the general kernels in mp_real, arb and the functions of πx at dyadic x.AlgorithmComplex elementary functionsHow acb, acf and nfloat_complex compose the real elementary functions into complex ones - numerically stable piecewise formulas, the branch cuts, the per-part rounding of acf with its complex-relative relaxed modes, and the exact, axial and near-axial cases.AlgorithmMathematical constantsThe formulas and algorithms behind the constants of FLINT (π, e, log 2, log 10, Euler's constant, Catalan's constant, ζ(3), ζ(5), Γ(1/3), Γ(1/4), Khinchin's, Glaisher's and the reciprocal Fibonacci constant) - binary splitting of hypergeometric series, the dual-number splitting for Euler's constant, sums of zeta values and, at very high precision, an approximate functional equation for Khinchin's constant - with their error bounds, and how the values are cached.AlgorithmThe gamma functionRigorous evaluation of Γ, 1/Γ and log Γ in ball arithmetic — the Stirling series with Olver's error bound and argument reduction, rising factorials by rectangular and binary splitting, a tabulated Taylor series of 1/Γ for low and medium precision, fast formulas for rational arguments, and the principal branch of log Γ.AlgorithmHypergeometric functionsThe general machinery for hypergeometric functions in ball arithmetic — convergent series with rigorous tail bounds (also for power series parameters), asymptotic expansions with Olver's error bounds, the choice between them by estimated cancellation, connection formulas and regularization, and the summation algorithms (forward recurrence, rectangular splitting, binary splitting, fast multipoint evaluation, bit-burst continuation).AlgorithmSums of hypergeometric series with rational parametersPartial sums of hypergeometric series whose parameters are small rational numbers and whose argument is a real ball — the forward recurrence with a common denominator, rectangular splitting with exact integer block coefficients and decreasing precision, binary splitting for short arguments, and the variant that splits real and imaginary parts.AlgorithmError functions, incomplete gamma functions and exponential integralsHow the error functions, Fresnel integrals, incomplete gamma and beta functions and the exponential, logarithmic, sine and cosine integrals are reduced to 1F1, U and 2F1, how FLINT chooses between their convergent and asymptotic expansions, the real-variable algorithms with rectangular splitting, and the bit-burst algorithm for the incomplete gamma function at very high precision.AlgorithmBessel, Airy and Coulomb wave functionsHow the Bessel functions J, Y, I, K, the Airy functions and the Coulomb wave functions are reduced to the confluent hypergeometric functions 0F1 and U, how the method and the working precision are chosen, and the error bounds of the asymptotic expansions of the Airy functions, with the connection formulas that make them valid in the whole plane.AlgorithmThe Gauss hypergeometric functionEvaluation of 2F1(a,b;c;z) on the whole complex plane — the linear fractional transformations and how one is chosen, limits at integer parameter differences by power series perturbation, polynomial and special cases, analytic continuation by Taylor series with Cauchy–Kovalevskaya majorant bounds near exp(±πi/3), and numerical integration for real arguments.AlgorithmLegendre functions and orthogonal polynomialsLegendre polynomials of large degree by the method of Johansson and Mezzarobba (hypergeometric series at 0 and 1, an asymptotic expansion with explicit error bounds, and a recurrence, chosen by cost and cancellation), Gauss–Legendre nodes and weights by Newton iteration, bit-burst Newton steps and Newton–Taylor steps with certified Taylor bounds, associated Legendre functions of both kinds through 2F1 and connection formulas, spherical harmonics, and the classical orthogonal polynomials and their extensions to non-integer degree.AlgorithmThe dilogarithmEvaluation of the dilogarithm Li₂(z) on the whole complex plane — the series at 0 after one of four transformations, a series in log z with Bernoulli numbers near exp(±πi/3), Taylor continuation with explicit coefficient bounds, and the bit-burst algorithm at very high precision.AlgorithmZeta functions, polylogarithms and L-functionsEuler–Maclaurin summation for the Hurwitz zeta function and its derivatives with a rigorous remainder bound, power sums, Taylor expansion in the parameter, the Riemann zeta function at integers, polylogarithms, and the methods used for Dirichlet L-functions.AlgorithmMultiple zeta values and multiple polylogarithmsMultiple zeta values by Akhilesh's double tails in fixed-point arithmetic with exact error counting, and in quasi-linear time by Hölder convolution and binary splitting; star values and Yamamoto's interpolation from shared subwords; multiple polylogarithms and colored multiple zeta values through Goncharov's iterated integrals, as power series at 0 or split at 1/2, by binary splitting with majorant truncation bounds.AlgorithmThe Epstein zeta functionEpstein zeta functions of lattices in any dimension by Crandall's representation, with rigorous truncation from the theta tail bound; the scaled incomplete gamma function; a double-precision ball kernel with certified tables of the incomplete gamma function; Mellin integrals of theta functions by Gauss–Legendre quadrature with Bernstein-ellipse bounds and direct sums for large arguments; and, for rational lattices, sums by shells with exact counts from products of theta series, enumeration or sums of three squares, used for the Madelung constant.AlgorithmZeros of the Riemann zeta functionThe Hardy Z-function, Gram points and Turing's method for proving the count of zeros, the Riemann–Siegel formula with Arias de Reyna's error bounds, and Platt's method that isolates thousands of zeros at large height with one FFT-based multi-evaluation.AlgorithmElliptic integrals, elliptic functions and modular formsThe complex arithmetic-geometric mean with Dupont's error bound, complete and incomplete elliptic integrals through the AGM and Carlson's duplication algorithm with high-order Taylor series, Weierstrass functions via theta functions, and modular forms by reduction to the fundamental domain and q-series with short addition sequences.AlgorithmTheta functionsJacobi and Riemann theta functions in any genus: characteristics, the action of the symplectic group and reduction, summation over ellipsoids with rigorous tail bounds, and the genus 1 summation with addition sequences.AlgorithmQuasi-linear evaluation of theta functionsThe algorithm of Elkies and Kieffer for Riemann theta functions in any genus: duplication formulas as a generalised AGM, square roots chosen from low-precision summations, an auxiliary real shift for robustness, dimension lowering for skewed matrices, and derivatives by finite differences.AlgorithmThe Lambert W functionEvaluation of all branches of the Lambert W function in real and complex ball arithmetic — starting values from asymptotic expansions, the series at the branch point and double-precision approximations, Halley iteration, and an a posteriori error bound from a bound for W' that also certifies the branch.

Referenced from#

Cite this page

The FLINT team, “Special functions,” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/algorithms/special-functions/index.html (generated 2026-11-20).