acb_hypgeom_pfq_choose_n
#include <flint/acb_hypgeom.h>slong acb_hypgeom_pfq_choose_n(acb_srcptr a, slong p, acb_srcptr b, slong q, const acb_t z, slong prec)sourceHeuristically chooses the number of terms n for summing the series at prec bits of working precision.
The function estimates the terms in double precision and stops when the current term is prec bits smaller than the largest term encountered, since cancellation is assumed to be significant. It also picks a reasonable truncation point for divergent (asymptotic) series, where the terms first decrease and then increase, stops at the last nonzero term of a terminating series, skips past parameters close to nonpositive integers, and returns at most 50 + 10\,\mathit{prec}. It can give poor results if the parameters are extremely large or extremely close to nonpositive integers.
The FLINT team, “acb_hypgeom_pfq_choose_n (acb_hypgeom.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/acb_hypgeom/acb_hypgeom_pfq_choose_n.html (generated 2026-10-20).
@misc{flint-doc-acb-hypgeom-acb-hypgeom-pfq-choose-n,
author = {{The FLINT team}},
title = {{acb\_hypgeom\_pfq\_choose\_n (acb\_hypgeom.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/acb_hypgeom/acb_hypgeom_pfq_choose_n.html},
note = {Generated 2026-10-20}
}