BUG: eval_chebyt, eval_chebyu, eval_legendre: fix odd integral `n` near `x = 0` #597
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.38) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.38 · 157 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.303
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #597"
general
weight: 0.35
jorenham
Reference issue
No issue; found while porting xsf to Rust (https://github.com/jorenham/xsf-rust/pull/1701):
What does this implement/fix?
For real
|x| < 1e-5and odd integral doublen(|n| <= 1000foreval_chebytandeval_chebyu, odd effective degree <= 300 afterP_{-n-1} = P_nforeval_legendre), these now use the existing integer-degree implementations. The 2F1 series cancels for oddnnear the origin, while those are accurate there. In sweeps against mpmath, the error never exceeded the old one by more than about 5 eps.eval_gegenbaueralready does this forn >= 0.Additional information
The new test fails on
mainwith GCC and Clang (relative error up to 1e-6) and passes with the fix.eval_jacobiwithalpha == betahas the same problem, but its integer path is also inaccurate near the origin; #603 fixes it.AI Generation Disclosure
Claude Sonnet 5.5 (Claude Code) wrote the fix, the test, and this description, following the plan in this comment. GPT-6.2 Sol (Codex CLI) reviewed it.