pub fn temme_ik<P, E, R, C, const NE: usize, const NO: usize>(
nu: R,
z: C,
needed: C::Mask,
t: &LogGamma1p<E, NE, NO>,
) -> (C, C)where
E: FloatElement,
R: FloatVector<Element = E> + TranscendentalMathWithPolicy,
C: FloatVector<Mask = R::Mask> + TranscendentalMathWithPolicy + PrimalProjection<Primal = R> + Mul<R, Output = C> + Div<R, Output = C> + Add<R, Output = C> + Sub<R, Output = C>,
P: Policy,Expand description
$(K_\nu(x), K_{\nu+1}(x))$ unscaled, by Temme’s series, for $|x| \le 2$ and
$\lvert\nu\rvert \le 1/2$.
Temme, Journal of Computational Physics vol 19, 324 (1975). Boost’s temme_ik.
The structural twin of
temme_y_nu: the same gamma1/gamma2 limits, the same
coef chain, the same paired-Additive shape through
sum_pair, combined differently and with the
coef multiplier positive rather than negative, since $I$/$K$ do not oscillate.
§Two of the four limits are shipped functions, not guards
$c = \sin(\pi\nu)/(\pi\nu)$ is exactly sinc_pi
and $d = \sinh\sigma/\sigma$ is exactly sinhc, so
neither needs the $0/0$ select Boost writes for it. Only gamma1 keeps one, and its
limit is $-\gamma$.
§Precondition
$\lvert\nu\rvert \le 1/2$ is not a suggestion. The series is built around
$\Gamma(1\pm\nu)$ near one. The caller reduces the order and walks $K$ up, which is
stable because $K$ is the dominant solution.