FLINT3.7.0-dev

arb_hypgeom_gamma_taylor

Synopsis#include <flint/arb_hypgeom.h>
int arb_hypgeom_gamma_taylor(arb_t res, const arb_t x, int reciprocal, slong prec)source

Attempts to compute Γ(x)\Gamma(x), or 1/Γ(x)1/\Gamma(x) if reciprocal is nonzero, using a precomputed Taylor series. Returns 1 and sets res on success; returns 0 without changing res if xx or prec is too large for the method.

The method reduces xx to u=x−r∈[−1/2,1/2]u = x - r \in [-1/2, 1/2] with rr an integer, evaluates the Taylor series of 1/Γ(1+u)1/\Gamma(1+u) with the coefficients stored in arb_hypgeom_gamma_coeffs, and multiplies or divides by a rising factorial. It applies for ∣x∣<160|x| < 160, for rr between about −(40+(prec−40)/4)-(40 + (\mathit{prec} - 40)/4) and 70+(prec−40)/870 + (\mathit{prec}-40)/8, and up to a working precision of ARB_HYPGEOM_GAMMA_TAB_PREC = 3456 bits. Wide inputs (below 40 bits of precision, or a radius above 2−162^{-16}) get an enclosure from double-precision bounds for Γ\Gamma at the endpoints, taking the minimum of Γ\Gamma on (0,∞)(0, \infty) into account. Otherwise the result has a radius of a few ulp, plus a bound for the error propagated from the radius of xx computed with an upper bound for the digamma function. See Taylor series of the reciprocal gamma function.

Cite this page

The FLINT team, “arb_hypgeom_gamma_taylor (arb_hypgeom.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/arb_hypgeom/arb_hypgeom_gamma_taylor.html (generated 2026-11-02).