`cyl_bessel_k(100, 746)` returns zero when evaluating at double precision (with no extended long double type), but the result should be 9.49147e-66. Underflow occurs in k0 and k1 prior to iteration. The problem is also present if v is perturbed to be a non-integer in which case CF2_ik underflows. Reduced test case from https://github.com/boostorg/math/pull/1228.
Activity
NAThompson commentedon Sep 1, 2026
@jzmaddock : On wolfram alpha I get ~3e-323, which is a denormal.
jzmaddock commentedon Sep 2, 2026
Correction, try:
cyl_bessel_k(-1000, 746)
We underflow to zero, wolfram gives 3.365e-67.
Fix underflow in BesselK
Fix underflow in BesselK
Fix underflow in BesselK