BUG: riccati_jn: fix uninitialized and inaccurate high orders #598
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.36) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 199 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 #598"
general
weight: 0.35
jorenham
Reference issue
No issue; follow-up to #572, found while porting xsf to Rust (https://github.com/jorenham/xsf-rust/pull/1746):
What does this implement/fix?
rctjnow always starts the backward recurrence atmsta2(x, n, 15), as theMSTA2branch of the FortranRCTJ, instead of atmsta1(x, 200)when that is belown, which left the orders above it unwritten and the ones just below it inaccurate. The rescaling from #572 prevents overflow at the higher start. Fork >= |x|whererj[k]is subnormal or zero,dj[k]now uses the ratio $r_k = \mathrm{rj}_k / \mathrm{rj}_{k-1}$ of two equally scaled recurrence values: $\mathrm{dj}_k = (1 - k r_k / x)\,\mathrm{rj}_{k-1}$ (DLMF 10.51.2).Additional information
The new test fails on
mainwith GCC and Clang (relative error 5e-10, and NaN-prefilled orders left unwritten) and passes with the fix. There are no xsref table tests forriccati_jn.AI Generation Disclosure
Claude Sonnet 5.5 (Claude Code) wrote the fix, the test, and this description, and Claude Opus 5.5 (Claude Code) the
djunderflow fix, following the plan in this comment. GPT-6.2 Sol (Codex CLI) reviewed it, and two GPT-6.2 Sol instances thedjfix.