Expand description
Bessel functions at half-integer order, where all four families are elementary.
$J_{1/2}(x) = \sqrt{2/\pi x}\,\sin x$ and $J_{-1/2}(x) = \sqrt{2/\pi x}\,\cos x$. The
modified pair swaps the circular functions for hyperbolic ones and $K$ is a bare
exponential. Every other half-integer order follows from the same three-term recurrence the
whole family obeys, so this arm needs no continued fraction, no $\Gamma$, and no
series: one sin_cos (or one exp_m1), one sqrt, and a bounded walk.
This is the spherical Bessel family wearing different clothes:
$j_n(x) = \sqrt{\pi/2x}\,J_{n+1/2}(x)$ and $y_n(x) = \sqrt{\pi/2x}\,Y_{n+1/2}(x)$.
§Boost does not do this, and that is not an oversight to copy
Boost special-cases $\nu = 1/2$ for cyl_bessel_i only. Its
cyl_bessel_j runs the full Steed machinery at every half-integer order, and its spherical
functions are thin wrappers that call straight back into it. So the
elementary route below is not a port. It is the identity Boost declines to exploit,
presumably because a scalar library gains little from it. Under SIMD it is the difference
between two continued fractions and a sin_cos.
What Boost’s caution is about is real: the unstable recurrence direction is still
unstable at half-integer order. $J$ and $I$ are the minimal solutions and $Y$ and
$K$ the dominant ones, exactly as at whole order, so the two arms here reuse the two
shapes the integer-order kernels measured, see
super::jy::bessel_jn_pair_impl and super::ik::bessel_in_pair_impl.
§Domain
$x > 0$. At half-integer order these functions carry a $\sqrt{x}$ and are genuinely
complex for negative $x$, so unlike the integer-order entry points there is no sign to
fold. The caller gets a NaN out of the sqrt.
Functions§
- bessel_
ik_ half $(I_\nu(x), K_\nu(x))$at half-integer$\nu$, both signs of$\nu$, for$x > 0$.- bessel_
jy_ half $(J_\nu(x), Y_\nu(x))$at half-integer$\nu$, both signs of$\nu$, for$x > 0$.