Bessel

Numerically stable scaled modified Bessel functions for state-space GPs.

Leaf module imported by both sde.py and kernels.py.

See plans/2026-04-21-state-space-gps-design.md Β§Bessel stability.

Three regimes are dispatched via nested jax.lax.cond so that only the taken branch contributes under jit and grad:

  • c > truncation_order : forward recurrence seeded by i0e/i1e
  • 1e-8 <= c <= truncation_order : Miller's downward recurrence rescaled by i0e(c)
  • c < 1e-8 : power-series Δ¨_k(c) β‰ˆ (c/2)^k / k! Β· e^{-c}