fix(lsmr): run the recurrence on u₁ and test its stop in exact exponents - #395
Merged
Merged
Conversation
schroedk
changed the base branch from
refactor/lsmr-rotation-types
to
perf/demeaned-from-exit
September 23, 2026 13:16
schroedk
force-pushed
the
fix/lsmr-extreme-scales
branch
from
September 23, 2026 13:16
58bd91e to
84398fe
Compare
schroedk
added this pull request to stack #396
September 23, 2026 13:17
schroedk
force-pushed
the
fix/lsmr-extreme-scales
branch
2 times, most recently
from
September 23, 2026 13:28
fd8728c to
151d01b
Compare
schroedk
removed this pull request from stack #396
September 23, 2026 15:05
schroedk
force-pushed
the
fix/lsmr-extreme-scales
branch
from
September 23, 2026 15:06
151d01b to
9a3bf4f
Compare
schroedk
added this pull request to stack #398
September 23, 2026 15:06
schroedk
force-pushed
the
fix/lsmr-extreme-scales
branch
from
September 23, 2026 15:19
9a3bf4f to
c230953
Compare
schroedk
removed this pull request from stack #398
September 23, 2026 15:35
schroedk
force-pushed
the
fix/lsmr-extreme-scales
branch
from
September 23, 2026 15:35
c230953 to
7954f8e
Compare
schroedk
added this pull request to stack #400
September 23, 2026 15:36
schroedk
removed this pull request from stack #400
September 23, 2026 15:51
schroedk
force-pushed
the
fix/lsmr-extreme-scales
branch
from
September 23, 2026 15:52
7954f8e to
6849a4e
Compare
schroedk
added this pull request to stack #402
September 23, 2026 15:52
schroedk
force-pushed
the
fix/lsmr-extreme-scales
branch
3 times, most recently
from
September 23, 2026 16:22
3c51aaf to
e3396e8
Compare
schroedk
force-pushed
the
fix/lsmr-extreme-scales
branch
from
September 23, 2026 16:50
e3396e8 to
bb5b996
Compare
schroedk
force-pushed
the
fix/lsmr-extreme-scales
branch
from
September 23, 2026 17:07
bb5b996 to
b300ace
Compare
schroedk
force-pushed
the
fix/lsmr-extreme-scales
branch
from
September 24, 2026 09:48
7f5a474 to
bace6ec
Compare
schroedk
removed this pull request from stack #402
September 24, 2026 09:48
At ‖A‖‖b‖ > 1e308 the unscaled `ζ̄₁ = α₁β₁` overflowed, and `‖A‖²` in the Frobenius estimate left the range from ‖A‖ ≈ 1e±154. The scalar recurrence now runs on `u₁ = b / β₁`, with β₁ restored only in the solution update and the reported residual; ‖A‖_F accumulates by hypot. The backward error `‖Aᵀr‖ / (‖A‖‖r‖)` and the reported relative normal-equation residual are formed as `Magnitude`s (m·2^e), whose products and ratios keep their exponent exactly, so neither overflows where the ratio itself is representable. A power-of-two scaling sweep pins the unpreconditioned solve to its unit-scale twin at ‖A‖ = 2^±5xx and ‖A‖‖b‖ = 2^±1030.
…r check `NormalEqReference::relative` was the only user of `PartialOrd` and `ZERO`; a zero-or-normal reference tests the same with `is_normal`. `Mul` had one caller and is inlined into `product`. `check` evaluates the unit residual once for both stop tests, and the scaling sweep drops its never-run `mlsmr` arm. Bitwise identical on the probe set.
schroedk
force-pushed
the
fix/lsmr-extreme-scales
branch
from
September 24, 2026 11:31
bace6ec to
4c1ab6d
Compare
`ζ/(ρρ̄)` on the unit RHS can underflow to zero where `β₁ζ/(ρρ̄)` is a normal double, so `x` stayed 0 while the recurrence reported a converged stop. Co-Authored-By: Claude <noreply@anthropic.com>
…allback `Magnitude::product` of two positive finite norms never vanishes, and a zero α₁ returns before any report; also corrects the `warm` and `pow2` docs. Co-Authored-By: Claude <noreply@anthropic.com>
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.
Stack 2/5 (extreme scales), based on #406.
u₁ = b / β₁, restoringβ₁only in the solution update and the reported residual;‖A‖_Faccumulates byhypot.‖Aᵀr‖ / (‖A‖‖r‖)and the reported normal-equation residual are exact-exponent products (Magnitude): a solve whose‖A‖²or‖A‖‖b‖leaves the double range no longer errors, misses its normal-equation stop, or reports a zero residual.checkevaluates the unit residual once for both stop tests;Magnitudecarries only what the solve uses (no ordering).A power-of-two scaling sweep pins the unpreconditioned solve to its unit-scale twin at
‖A‖ = 2^±5xxand‖A‖‖b‖ = 2^±1030. Normal-range solves keep their stop reasons and iteration counts (x differs at ~1e-15).Next: #403 (vector normalization) → #404 (MGK
⟨v, Mv⟩) → #405 (warm reference).