acb_calc_integrate_gl_auto_deg
#include <flint/acb_calc.h>int acb_calc_integrate_gl_auto_deg(acb_t res, slong * num_eval, acb_calc_func_t func, void * param, const acb_t a, const acb_t b, const mag_t tol, slong deg_limit, int verbose, slong prec)sourceAttempts to compute with one Gauss–Legendre rule of degree at most deg_limit, chosen automatically so that the error bound is below tol. Returns ARB_CALC_SUCCESS and the enclosure in res if this is possible, and ARB_CALC_NO_CONVERGENCE with res indeterminate otherwise. The number of evaluations of is written to num_eval. If verbose is nonzero, the chosen degree is printed.
With and , the integral is with . If is holomorphic and inside the ellipse with foci and semi-axes and , , the error of the -point Gauss–Legendre rule is at most
a slightly weakened form of a bound of Trefethen [Tre2008]. is obtained by evaluating with order 1 on the rectangle mapped to the segment. The function tries (doubling the exponent) as long as is finite, and for each the smallest degree from the sequence (steps of about ) that meets the tolerance; the smallest found is used. The nodes and weights are computed by arb_hypgeom_legendre_p_ui_root [JM2018] (Roots of Legendre polynomials and Gauss–Legendre nodes) and cached (per thread), and the evaluations are distributed over threads when flint_get_num_threads() is greater than one.
References#
- [Tre2008] L. N. Trefethen, "Is Gauss Quadrature Better than Clenshaw-Curtis?", SIAM Review, 50:1 (2008), 67-87, https://doi.org/10.1137/060659831
- [JM2018] F. Johansson and M. Mezzarobba, "Fast and rigorous arbitrary-precision computation of Gauss-Legendre quadrature nodes and weights", preprint (2018), https://arxiv.org/abs/1802.03948
The FLINT team, “acb_calc_integrate_gl_auto_deg (acb_calc.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/acb_calc/acb_calc_integrate_gl_auto_deg.html (generated 2026-11-02).
@misc{flint-doc-acb-calc-acb-calc-integrate-gl-auto-deg,
author = {{The FLINT team}},
title = {{acb\_calc\_integrate\_gl\_auto\_deg (acb\_calc.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/acb_calc/acb_calc_integrate_gl_auto_deg.html},
note = {Generated 2026-11-02}
}