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 \Gamma(x), or 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 x or prec is too large for the method.

The method reduces x to u = x - r \in [-1/2, 1/2] with r an integer, evaluates the Taylor series of 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, for r between about -(40 + (\mathit{prec} - 40)/4) and 70 + (\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^{-16}) get an enclosure from double-precision bounds for \Gamma at the endpoints, taking the minimum of \Gamma on (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 x 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-10-20).