Repository navigation
Fix AB13CD MAXIT exit and GAMMA**2 FMA divergence from Fortran - #23
Merged
Merged
Conversation
- loop never hit INFO=2 at MAXIT; returned gammal/2 with INFO=0 - gamma*gamma - x contracted to fnmsub; reference rounds GAMMA**2 first - wrapper: init fpeak (garbage on INFO!=0) - 4 seeded Fortran differential cases; 15k random sweep now bitwise Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
jamestjsp
enabled auto-merge (squash)
October 12, 2026 00:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #20 (DLAPY2). Two more AB13CD divergences from the Fortran reference:
while (iter < MAXIT)+ post-loopif (iter > MAXIT)never set INFO=2. C fell out with GAMMAU=0, returninggammal/2with INFO=0. Now mirrors Fortran label 120 (increment, check, INFO=2).gamma*gamma - xintofnmsub(both diagonal shifts). gfortran -O3 reference hoistsGAMMA**2and rounds it first. Bits changed DPOTRF/DPOSV/DGEES inputs → INFO 0↔2 flips, hnorm off up to ~50%. Fixed via separategamma2statement.py_ab13cdfpeakinitialized; previously stack garbage returned on INFO≠0.Evidence
Random differential sweep vs
libslicot(Accelerate both sides, wrapper LDWORK/LCWORK; n≤6, m,p≤2, tol=1e-9; half shifted-random, half lightly damped modes 1e-7..1e-1 under similarity):Tests
tests/python/test_ab13cd_fortran_reference.py: +4 seeded cases (maxit_info2,dlapy2_omega,gamma2_rounding,gamma2_dpotrf_info) in the NPZ fixture; now also compares INFO (incl. INFO=2) and FPEAK. 3 of 4 fail on priorab13cd.c.Reviewer notes
CTRLSYS_FORTRAN_REFERENCE_LIBset: 11 pre-existing reference-diff failures (ab09jd, ab13fd, mb03zd, mb04ad/dp/ed/tb, sb04od, sb10dd, sg02nd, tg01jy); none touch AB13CD.🤖 Generated with Claude Code