Skip to main content

laguerre_function_series

Function laguerre_function_series 

Source
pub fn laguerre_function_series<P, E, V, const N: usize, const INT_ALPHA: bool>(
    x: V,
    alpha: V,
    alpha_int: i32,
    coeffs: &[E; N],
) -> V
where P: Policy, E: FloatElement, V: FloatVector<Element = E> + SpecializedSpecialMath<E>,
Expand description

Clenshaw summation of a Laguerre-function series, $\sum_{k=0}^{N-1} c_k l_k^{(\alpha)}(x)$.

Clenshaw over l_k / l_0, with the coefficients pre-scaled by f = e^{-x/4} and the outer factor reduced to g = l_0 / f, the same split as laguerre_function. With alpha_k = (2k + alpha + 1 - x) / s_k and beta_k = -s_{k-1} / s_k:

y_k = f c_k + alpha_k y_{k+1} + beta_{k+1} y_{k+2}      k = N-1 down to 1
S   = g * (f c_0 + alpha_0 y_1 + beta_1 y_2)

The recurrence runs backward, so s_k is needed at step k and s_{k-1} one step later, the opposite order from the forward kernel. s_{k-1} is recomputed rather than carried, since it is one sqrt off the critical path either way (and a folded literal under INT_ALPHA at a compile-time weight).

Last built: 2026-09-08 21:35:55 UTC