BUG: it2i0k0: restore the asymptotic coefficients' exponents and the sqrt(2x/pi) factor #330
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 200 lines diff across 2 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.317
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #330"
general
weight: 0.35
mkzung
Reference issue
None.
What does this implement/fix?
it2i0k0(30)[1], the integral of K0(t)/t from 30 to infinity, returns 2.0349881754088256e-14. mpmath gives 6.780268362546424e-16. Two translation errors from the Fortran ITTIKA:D+nexponents (1.45380859375D+1to1.4950639538279D+5);rcreadsx sqrt(2.0 / (pi x)), where the Fortran hasRC=XDSQRT(2.0D0/PIX).So the second output is off by about a factor of x for every x above 12, and the first is off by 2.2e-4 from x = 40, where its asymptotic branch starts.
Additional information
The new test checks x = 30, 40, 100 and 300 against mpmath and fails on main. Its tolerances (1e-6 at x = 30, 1e-7 above) are looser than the error of the Fortran's own expansion (5.7e-8 at x = 30). clang-format puts the restored coefficients one per line.
Reference values, mpmath 1.3.0:
AI Generation Disclosure
Claude (Anthropic) helped find the case and write the fix and test. I checked it against the Fortran and ran the tests.