pub fn steed_jy_nu<P, E, V>(
nu: V,
n: V,
u: V,
x: V,
needed: V::Mask,
) -> (V, V, V)Expand description
$(J_\nu, Y_u, Y_{u+1})$ by Steed’s method at the reduced order $u = \nu - n$,
$\lvert u\rvert \le 1/2$, for the band between the two other arms.
§The order reduction is not optional
Boost runs CF1 at $\nu$, recurs the $J$ ratio down to $u$, runs CF2 and the
Wronskian at $u$, and walks $Y$ back up (its x > 2 branch).
Running everything at $\nu$ directly is fine for $\nu \in [-1/3, 2]$ and catastrophic
above: at $\nu = 7.4$, $x = 2.07$, $Y$ measured 4.3 million ULP and $J$ 678
against mpmath.
The reason is CF2. The Thompson-Barnett fraction for $H'/H$ converges for every
$x > 0$, but its accuracy collapses once $\nu$ is well above $x$, the same fact
that makes the modified twin reduce its order for both $K$ arms. CF1 has no such
problem, so the ratio it delivers at $\nu$ is walked down instead, and the walk is the
stable direction for $J$. Below $\lvert\nu\rvert \le 1/2$ the reduction is the
identity and this is exactly the six-line arm.
§The pieces
CF1 at $\nu$ gives $f_\nu = J_{\nu+1}/J_\nu$ and the sign of $J_\nu$. The
three-term recurrence walked down from $\nu$ with a tiny seed (prev, cur proportional
to $J_{k+1}$, $J_k$) reaches $u$ with two things in hand: $f_u = J_{u+1}/J_u$ and
the scaling $J_\nu/J_u$. CF2 at $u$ and the Wronskian
$J_u Y'_u - J'_u Y_u = 2/\pi x$ then give $\lvert J_u\rvert$, $Y_u$ and $Y_{u+1}$.
The sign of $J_u$ is the sign of $J_\nu$ times the sign the walk ended on. The
caller walks $Y$ up, which it does for the Temme arm anyway.
§Measured
At small order the arithmetic is unchanged: notes/special/tools/model_steed.py,
envelope-relative against mpmath at 60 digits, over x in [4, 30] and nu in
[-1/3, 2], worst 7.62 eps for J, 5.74 for Y. The iteration counts move in
opposite directions: CF1 grows with x (20 to 35 across the gap), CF2 shrinks (16 to 8),
so their sum is nearly flat over the region this covers.