// Copyright (C) 2026 Kiyotsugu Arai
// SPDX-License-Identifier: LGPL-3.0-or-later
// orthogonal_classical.hpp
// Classical orthogonal polynomials (Hermite / Laguerre / Chebyshev)
//
// Functions provided:
// hermiteH(n, x) — Hermite polynomial H_n(x) (physicists' version, weight e^{-x²})
// hermiteHe(n, x) — Hermite polynomial He_n(x) (probabilists' version, weight e^{-x²/2})
// laguerreL(n, x) — Laguerre polynomial L_n(x) (weight e^{-x}, [0,∞))
// assocLaguerreL(n, α, x) — generalized Laguerre polynomial L_n^α(x) (weight x^α e^{-x})
// chebyshevT(n, x) — Chebyshev of the first kind T_n(x) (weight 1/√(1-x²))
// chebyshevU(n, x) — Chebyshev of the second kind U_n(x) (weight √(1-x²))
//
// All computed stably via three-term recurrences (Bonnet/Favard).
//
// Relation to the existing jacobiP:
// T_n(x) ∝ P_n^{(-1/2,-1/2)}(x), U_n(x) ∝ P_n^{(1/2,1/2)}(x)
// The standalone implementation is faster with lower overhead (about one order of magnitude in the double-precision range).
//
// Supported types:
// float, double, long double — direct recurrence
// Float
— TODO: arbitrary-precision version (native only for now)
// Audit: TODO/PLAN_CAS_PHASE2C_ALGEBRAIC_20260507.md is a separate matter; this implementation is
// priority item 1 of the audit (project_sangi_special_functions_audit_20260507).
#ifndef SANGI_SPECIAL_ORTHOGONAL_CLASSICAL_HPP
#define SANGI_SPECIAL_ORTHOGONAL_CLASSICAL_HPP
#include