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 arb and acb, the gamma and hypergeometric functions of arb_hypgeom and acb_hypgeom, the zeta and L-functions of acb_dirichlet, 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 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 arb evaluates exp, log, sin, cos and atan with rigorous error bounds - argument reduction modulo log 2 and π/4, precomputed tables, Taylor series by rectangular splitting on fixed-point numbers, reduction by logarithms of primes, Newton iteration and the bit-burst algorithm - and how the algorithm is chosen by precision.AlgorithmMathematical constantsThe formulas and algorithms behind arb_const_pi, arb_const_e, arb_const_log2, arb_const_log10, arb_const_euler, arb_const_catalan, arb_const_apery, arb_const_zeta5, arb_const_khinchin, arb_const_glaisher and arb_const_reciprocal_fibonacci, 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, 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.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-10-20).