pub trait BesselDetails<V: FloatVector + PrimalProjection> {
const ASYM_TWO_TERMS: bool = false;
// Provided methods
fn near(z: V) -> V::Mask { ... }
fn beyond(z: V, threshold: V::Primal) -> V::Mask { ... }
fn valid(z: V) -> V::Mask { ... }
fn exp_far(z: V, threshold: V::Primal) -> V::Mask { ... }
fn asym_second_exponent(z: V, _nu: V::Primal) -> V { ... }
}Expand description
Per-arithmetic decisions of the real-order modified Bessel kernel,
bessel_ik_real.
The kernel’s arithmetic (Temme’s series, two continued fractions, the Wronskian, the
asymptotic series) is the same over R and over C. What changes is every place it
compares the argument: region selects by magnitude, the domain test, the overflow
corner of the exponential. On a real vector those are plain comparisons. On Complex
cmp_lt is a lexicographic sort order, not a modulus, and would route far-off-axis
points into the wrong arm. Same split as ExpIntDetails.
The order is always real (V::Primal), which is why every threshold here is a
primal and why the kernel takes the order as a separate real vector.
The blanket impl below covers every primal type (real f32/f64 vectors,
Compensated) with the real-line defaults. Complex overrides all of it.
Provided Associated Constants§
Sourceconst ASYM_TWO_TERMS: bool = false
const ASYM_TWO_TERMS: bool = false
Whether the large-argument expansion of I carries its second exponential.
$I_\nu(z) \sim \frac{e^{z}}{\sqrt{2\pi z}}\sum(-1)^k a_k z^{-k} + \frac{e^{-z \pm (\nu+1/2)\pi i}}{\sqrt{2\pi z}}\sum a_k z^{-k}$ (DLMF 10.40.5). On the real line the
second term is $e^{-2x}$ relative and below epsilon wherever the arm runs, so the
default drops it. Off the axis its modulus is $e^{-2\,\mathrm{Re}\,z}$, which on
the imaginary axis is one, so Complex keeps it.
Provided Methods§
Sourcefn near(z: V) -> V::Mask
fn near(z: V) -> V::Mask
Lanes in the small-argument region, |z| <= 2, where K comes from Temme’s series.
Sourcefn beyond(z: V, threshold: V::Primal) -> V::Mask
fn beyond(z: V, threshold: V::Primal) -> V::Mask
Lanes with |z| >= threshold, per lane: where I takes the asymptotic series.
Sourcefn valid(z: V) -> V::Mask
fn valid(z: V) -> V::Mask
Lanes inside the kernel’s domain: the open positive axis, or the closed right half-plane less the origin. The origin itself is selected to its limits by the kernel. Everything else outside this mask is NaN.
Sourcefn exp_far(z: V, threshold: V::Primal) -> V::Mask
fn exp_far(z: V, threshold: V::Primal) -> V::Mask
Lanes where a single e^z overflows before e^z * a does, so the exponential is
halved and applied twice: Re z >= threshold.
Sourcefn asym_second_exponent(z: V, _nu: V::Primal) -> V
fn asym_second_exponent(z: V, _nu: V::Primal) -> V
The exponent of that second term in the scaled domain, $-2z \pm (\nu+1/2)\pi i$
with the sign of Im z. Only read when ASYM_TWO_TERMS.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".