Skip to content

Fix SG02AD scaling for factored Q/R - #19

Merged
jamestjsp merged 1 commit into
mainfrom
claude/slicot-issue-46-repro-3af824
Oct 11, 2026
Merged

jamestjsp merged 1 commit into
mainfrom
claude/slicot-issue-46-repro-3af824

Conversation

@jamestjsp

Copy link
Copy Markdown
Owner

Summary

  • SG02AD with JOBB='B', SCAL='G', FACT in C|D|B scaled factors C/D by SCALE, so C'C/D'D were scaled by SCALE^2 while X was unscaled by SCALE -> wrong solution.
  • Scale factors by sqrt(SCALE) (same as SB02OD).
  • Upstream report: SG02AD with JOBB='B' and FACT='C' SLICOT/SLICOT-Reference#46 (reproduced in Fortran reference; bug still present there).

Scalar case A=B=E=Q=R=1, DICO='C': expected X = 1+√2. Before: FACT C/D/B -> 2.2247 / 1.3660 / 1.2071. After: 2.4142.

Tests

  • test_scaling_factored_scalar: issue case, FACT C/D/B.
  • test_scaling_factored_matches_unfactored: DICO C/D × FACT C/D/B × JOBL Z/N vs FACT='N' unscaled.
  • New tests: 15 fail before, pass after. Full suite green except pre-existing test_mb04tb blocked path / test_sb10dd Fortran-reference mismatches (fail on main too).

🤖 Generated with Claude Code

SCAL='G' scaled factors C/D by SCALE, so C'C/D'D got SCALE^2 -> wrong X.
Scale factors by sqrt(SCALE), as SB02OD does. SLICOT-Reference#46.

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

chatgpt-codex-connector Bot commented Oct 11, 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-11T22:58:21.676971Z 1b853f3 PR opened
ℹ️ 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 11, 2026 23:23
@jamestjsp
jamestjsp merged commit e99e773 into main Oct 11, 2026
5 of 6 checks passed
@jamestjsp
jamestjsp deleted the claude/slicot-issue-46-repro-3af824 branch October 11, 2026 23:31
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