pub fn bessel_yn_recur<E, V, const N: i32>(x: V, y0: V, y1: V) -> (V, V)where
E: FloatElement,
V: FloatVector<Element = E>,Expand description
(Y_{N-1}, Y_N) by upward recurrence from the two closed forms.
Y_{n+1}(x) = \frac{2n}{x} Y_n(x) - Y_{n-1}(x)$Y_\nu$ is the dominant solution of Bessel’s equation, so upward is stable and costs
exactly N - 1 steps, with no trip count, x dependence or precision tier. Same argument
and same shape as bessel_kn_recur. The only difference
is the sign, since this is the unmodified equation.
Measured against mpmath over orders 2..50 and x in 0.1..300: worst 2.8e-14 relative.
Looser than K’s 1.4e-15 because this recurrence subtracts where K’s adds, so it does
accumulate a little cancellation, but Y_n grows with n, which keeps it bounded.