Skip to content

Use DLAPY2 instead of hypot to match Fortran - #20

Merged
jamestjsp merged 2 commits into
mainfrom
claude/intelligent-elgamal-797628
Oct 12, 2026
Merged

jamestjsp merged 2 commits into
mainfrom
claude/intelligent-elgamal-797628

Conversation

@jamestjsp

Copy link
Copy Markdown
Owner

Summary

  • Replace hypot() with SLC_DLAPY2 at every site where SLICOT Fortran uses DLAPY2: ab13dd.c (6 sites ↔ 8 Fortran calls), ab13cd.c, ma01ad.c, mb03rd.c (5), mb04ad.c.
  • hypot differs from DLAPY2 in last bits (~22% of inputs vs Accelerate), enough to flip threshold tests; AB13CD could stall and return hnorm/2.
  • Add Fortran differential tests: test_ab13cd_fortran_reference.py (half-norm stall, lightly damped mode), one AB13DD near-imaginary-axis case. All fail on pre-change build.

Validation

  • 3000-system random sweep vs Fortran reference (both on Accelerate): AB13CD bitwise matches 2369→2904; significant mismatches 120→85; AB13DD improves in all 8 DICO/JOBE/JOBD combos. 2 AB13CD cases regress; ~50 residual AB13CD divergences predate this change (separate investigation).
  • Full suite: 6809 passed; 3 failures (test_ab13fd html, test_mb04tb blocked path, test_sb10dd html) also fail on pre-change build.
  • check_translation_smells.py clean.

🤖 Generated with Claude Code

hypot differs from DLAPY2 in last bits; flips AB13CD/AB13DD branch
tests (e.g. AB13CD returned hnorm/2). Sites: ab13dd, ab13cd, ma01ad,
mb03rd, mb04ad. Add Fortran differential tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T00:22:50.673995Z 545f17b Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jamestjsp
jamestjsp enabled auto-merge (squash) October 12, 2026 00:14

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0637882b46

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/python/test_ab13cd_fortran_reference.py Outdated
Comment thread tests/python/test_ab13dd_fortran_reference.py Outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jamestjsp

Copy link
Copy Markdown
Owner Author

@codex review

@jamestjsp
jamestjsp merged commit 0252db5 into main Oct 12, 2026
2 of 3 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 545f17bedf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant