BUG: pro_rad2/obl_rad2: sphy highest order and rmn2sp product range #331
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.40) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 145 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.298
Real PR Conversation Timeline
1 comments
"Review active on #331"
general
weight: 0.35
mkzung
Reference issue
None.
What does this implement/fix?
oblate_radial2_nocv(1, 4, 0.5, 2)returns a derivative of -7375231.8268000465. SciPy 1.12 gives 176.19707858977299, and only that value satisfies the Wronskian R1 R2' - R1' R2 = 1/(c(x^2 + 1)). Two places differ from the Fortran:sphysetsnm = n - 1after a full loop, where SPHY leaves NM = N, sormn2lstops one order early and the caller falls back;rmn2spthe productr1 = (m + j1)runs over j1 = 0 to j-1, where the Fortran runs J1 = 1 to J.Additional information
On a grid of 450 points per function (m up to 2, n up to 6, c from 0.5 to 15, x from 1.05 to 5), the number of points with Wronskian error above 1e-8 falls from 120 to 67 (prolate) and from 240 to 210 (oblate). At 12 prolate points with x = 1.5 or 2 the error rises from about 1e-15 to at most 2.7e-9; that comes from the
sphychange, and SciPy 1.12 gives the same values there. The new test checks the Wronskian at five points and fails on main.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.