/** * Polygamma functions and classical orthogonal polynomials. * * `polygamma(n, x)` is the n-th derivative of the digamma function, * ψ^(n)(x) = d^n/dx^n ψ(x). It is computed by shifting the argument up via * the standard recurrence * * ψ^(n)(x) = ψ^(n)(x + m) + (-1)^(n+1) n! * sum_{k=0}^{m-1} 1/(x+k)^(n+1) * * until x + m is large enough (>= SHIFT_THRESHOLD) for the asymptotic * (Bernoulli) expansion (DLMF 5.15.8) to converge to machine precision: * * psi^(n)(X) ~ (-1)^(n-1) * [ (n-1)!/X^n + n!/(2 X^(n+1)) * + sum_j B_{2j} * (2j+n-1)! / ((2j)! * X^(2j+n)) ] * * Since (-1)^(n+1) = (-1)^(n-1), both pieces share the same overall sign. * * `jacobiP` and `gegenbauerC` are evaluated with their standard stable * three-term recurrences (DLMF 18.9.2 and 18.9.1 respectively), matching the * pattern already used for `chebyshevT` / `hermiteH` / `laguerreL` / * `legendreP`. * * @packageDocumentation */ /** * Polygamma function ψ^(n)(x): the n-th derivative of the digamma function. * * `polygamma(0, x)` delegates to `digamma(x)`. For `n >= 1`, x is shifted up * via the standard recurrence until it is large enough for the Bernoulli * asymptotic expansion to converge. * * @param n - Derivative order (nonnegative integer) * @param x - Argument (must not be a nonpositive integer, where ψ^(n) has poles) * @returns ψ^(n)(x) * * @example * polygamma(1, 2) // ~0.6449340668 (trigamma(2)) * polygamma(2, 1) // ~-2.4041138063 */ export declare function polygamma(n: number, x: number): number; /** * Trigamma function ψ'(x) = ψ^(1)(x): the first derivative of the digamma * function. Equivalent to `polygamma(1, x)`. * * @param x - Argument * @returns ψ'(x) * * @example * trigamma(2) // ~0.6449340668 (= zeta(2) - 1 = pi^2/6 - 1) */ export declare function trigamma(x: number): number; /** * Jacobi polynomial P_n^(alpha,beta)(x), evaluated via the standard * three-term recurrence (DLMF 18.9.2). * * @param n - Degree (nonnegative integer) * @param alpha - Parameter alpha (> -1) * @param beta - Parameter beta (> -1) * @param x - Evaluation point * @returns P_n^(alpha,beta)(x) * * @example * jacobiP(2, 1, 1, 0.5) // 0.1875 */ export declare function jacobiP(n: number, alpha: number, beta: number, x: number): number; /** * Gegenbauer (ultraspherical) polynomial C_n^(alpha)(x), evaluated via the * standard three-term recurrence (DLMF 18.9.1). * * @param n - Degree (nonnegative integer) * @param alpha - Parameter alpha (> -1/2, alpha != 0) * @param x - Evaluation point * @returns C_n^(alpha)(x) * * @example * gegenbauerC(2, 1, 1) // 3 (C_2^(1)(x) = 4x^2 - 1) */ export declare function gegenbauerC(n: number, alpha: number, x: number): number; //# sourceMappingURL=polygamma-orthopoly.d.ts.map