arb_hypgeom_legendre_p_ui_zero, arb_hypgeom_legendre_p_ui_one, arb_hypgeom_legendre_p_ui_asymp, arb_hypgeom_legendre_p_ui_rec, arb_hypgeom_legendre_p_ui
Synopsis
#include <flint/arb_hypgeom.h>void arb_hypgeom_legendre_p_ui_zero(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong K, slong prec)sourcevoid arb_hypgeom_legendre_p_ui_one(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong K, slong prec)sourcevoid arb_hypgeom_legendre_p_ui_asymp(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong K, slong prec)sourcevoid arb_hypgeom_legendre_p_ui_rec(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong prec)sourcevoid arb_hypgeom_legendre_p_ui(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong prec)sourceSets res to the Legendre polynomial P_n(x) and res_prime to its derivative P'_n(x). Either output may be NULL.
The algorithm is that of Johansson and Mezzarobba [JM2018]; see Legendre functions and orthogonal polynomials.
arb_hypgeom_legendre_p_ui_zeroandarb_hypgeom_legendre_p_ui_onesum the hypergeometric expansions at x = 0 and x = 1, andarb_hypgeom_legendre_p_ui_asympthe asymptotic expansion in n valid on (-1, 1) with the error bound of Bogaert, Michiels and Fostier [Bog2012]. The parameter K is the exact number of terms; if the truncated expansion is not the exact polynomial, a bound for the remainder is added.arb_hypgeom_legendre_p_ui_recuses the three-term recurrence in fixed-point arithmetic; it is meant for x \in (-1,1), moderate n and modest precision.arb_hypgeom_legendre_p_uireduces to x \ge 0 by symmetry, picks the cheapest method from estimates of the number of terms and of the cancellation in each series, raises the working precision to compensate for the cancellation, and bounds the error propagated from an inexact x witharb_hypgeom_legendre_p_ui_deriv_bound.
References#
- [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
- [Bog2012] I. Bogaert, B. Michiels and J. Fostier, "O(1) computation of Legendre polynomials and Gauss-Legendre nodes and weights for parallel computing", SIAM Journal on Scientific Computing 34:3 (2012), C83-C101
Cite this page
The FLINT team, “arb_hypgeom_legendre_p_ui_zero, arb_hypgeom_legendre_p_ui_one, arb_hypgeom_legendre_p_ui_asymp, arb_hypgeom_legendre_p_ui_rec, arb_hypgeom_legendre_p_ui (arb_hypgeom.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/arb_hypgeom/arb_hypgeom_legendre_p_ui_zero.html (generated 2026-10-20).
@misc{flint-doc-arb-hypgeom-arb-hypgeom-legendre-p-ui-zero,
author = {{The FLINT team}},
title = {{arb\_hypgeom\_legendre\_p\_ui\_zero, arb\_hypgeom\_legendre\_p\_ui\_one, arb\_hypgeom\_legendre\_p\_ui\_asymp, arb\_hypgeom\_legendre\_p\_ui\_rec, arb\_hypgeom\_legendre\_p\_ui (arb\_hypgeom.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/arb_hypgeom/arb_hypgeom_legendre_p_ui_zero.html},
note = {Generated 2026-10-20}
}