acb_hypgeom_legendre_p
#include <flint/acb_hypgeom.h>void acb_hypgeom_legendre_p(acb_t res, const acb_t n, const acb_t m, const acb_t z, int type, slong prec)sourceSets res to the associated Legendre function of the first kind of degree n, order m and argument z; for m = 0 this is the Legendre polynomial P_n(z). Several branch cut conventions are in use. If type is 0, the function is
with cuts (-\infty, -1] and [1, \infty), and if type is 1, the function is
with the cut (-\infty, 1]. Type 0 and type 1 correspond to type 2 and type 3 in Mathematica and mpmath; other values of type raise an exception.
For real z, m = 0 and a nonnegative word-size integer n, the function calls arb_hypgeom_legendre_p_ui. For integers 0 \le m \le n and type 0 it evaluates (1-z^2)^{m/2} times the polynomial of acb_hypgeom_legendre_p_uiui_rec at low precision, near z = 1, or for small n - m; if n - m > 2\,\mathit{prec} the result is indeterminate, since the recurrence would lose all accuracy. Otherwise the hypergeometric representation is evaluated with acb_hypgeom_2f1.
The FLINT team, “acb_hypgeom_legendre_p (acb_hypgeom.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/acb_hypgeom/acb_hypgeom_legendre_p.html (generated 2026-10-20).
@misc{flint-doc-acb-hypgeom-acb-hypgeom-legendre-p,
author = {{The FLINT team}},
title = {{acb\_hypgeom\_legendre\_p (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_legendre_p.html},
note = {Generated 2026-10-20}
}