pub fn asymptotic_series_g<P, E, R, C, const SCALED: bool>(
z: C,
nu: R,
far: C::Mask,
) -> Cwhere
E: FloatElement,
R: FloatVector<Element = E>,
C: FloatVector<Mask = R::Mask> + TranscendentalMathWithPolicy + PrimalProjection<Primal = R> + BesselDetails<C> + Mul<R, Output = C>,
P: Policy,Expand description
asymptotic_series_v over a general arithmetic: the argument z in C, the order in
its real primal R, and the far mask supplied by the caller.
This is the body the real-order kernel runs, and through it the complex one. The loop is
the same as asymptotic_series_v’s. It is a separate function rather than that one’s
body because the integer and half-integer kernels call the real form from bounds that
know nothing of BesselDetails, and the second-term machinery below is only meaningful
off the real axis. Everything z-dependent is C arithmetic. The term numerators
(2k+1)^2 - 4 nu^2 stay real and enter through C: Mul<R>, so a complex instantiation
pays two real multiplies per term rather than a complex one.
§The second exponential
The expansion has two exponential terms (DLMF 10.40.5), and the real line keeps one
because the other is e^{-2x} relative, below epsilon anywhere this arm runs. That is
a fact about the real axis. Off it the second term’s modulus is e^{-2 Re z}, which on
the imaginary axis is one, so an arithmetic can ask for it through
BesselDetails::ASYM_TWO_TERMS. It costs one more exponential and no extra series
evaluation: the second sum is the first with every other sign flipped, so both are
accumulated in the one loop.