BUG: kv: fix `0` where `K_v(z)` is still normal #623
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 129 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.291
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #623"
general
weight: 0.35
dschmitz89
Reference issue
No issue; found while checking
kvagainst mpmath.What does this implement/fix?
AMOS flushes $K_\nu(z)$ to zero (
nz = 1) at its conservative underflow cutoff near $\mathrm{Re}(z) = 700$, sokvreturned0for normal values such askv(0, 699) = 1.27e-305, also for complexz. In that case this now takes the scaled $K_\nu(z) e^z$ and multiplies it by $e^{-z}$ as $e^{-x/2} \cdot e^{-iy} \cdot e^{-x/2}$, so the final scaling rounds each component once. If the scaled call fails, the result stays0.Additional information
The new test returns
0onmainwith GCC and Clang and passes with the fix. Thecyl_bessel_k/cyl_bessel_kexsref table tests pass; their 15 rows atx = 700.6(tolerance1.0) are now within 3e-16.AI Generation Disclosure
Claude Opus 5.5 (Claude Code) wrote the fix, the test, and this description, following the plan in this comment. Two GPT-6.2 Sol instances (Codex CLI) reviewed it.