dbbcsd/sbbcsd/cbbcsd/zbbcsd: fix insufficiently accurate U2 in CS dec…#1293
Open
jschueller wants to merge 1 commit into
Open
dbbcsd/sbbcsd/cbbcsd/zbbcsd: fix insufficiently accurate U2 in CS dec…#1293jschueller wants to merge 1 commit into
jschueller wants to merge 1 commit into
Conversation
…omposition The Golub-Reinsch-SVD-style iteration in xBBCSD used an absolute convergence threshold THRESH ~ 90*EPS to decide when off-diagonal bulges are negligible and can be skipped. For rows where the diagonal entries are small (tiny singular values in the ratio), this absolute threshold is too large relative to the diagonal, causing the algorithm to stop chasing bulges prematurely and producing inaccurate singular vectors (||X21 - U2 D2 V^*|| up to 50*EPS ||X21||). Fix: change all bulge-convergence checks (RESTART flags in the inner loop, initial bulge-chase decisions, and the IMAX-1 cleanup) from absolute to relative by scaling THRESH by the adjacent diagonal entries: RESTART11 = |B11E|^2+|BULGE|^2 <= (THRESH * MAX(|B11D(I-1)|,|B11D(I)|,UNFL))^2 This mirrors DBDSQR's relative convergence check |E| <= TOL*|D|. Applied to all 4 bidiagonal blocks (B11/B21/B12/B22) at all 3 check-points in the iteration. Fixes Reference-LAPACK#965
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.
…omposition
The Golub-Reinsch-SVD-style iteration in xBBCSD used an absolute convergence threshold THRESH ~ 90EPS to decide when off-diagonal bulges are negligible and can be skipped. For rows where the diagonal entries are small (tiny singular values in the ratio), this absolute threshold is too large relative to the diagonal, causing the algorithm to stop chasing bulges prematurely and producing inaccurate singular vectors (||X21 - U2 D2 V^|| up to 50*EPS ||X21||).
Fix: change all bulge-convergence checks (RESTART flags in the inner loop, initial bulge-chase decisions, and the IMAX-1 cleanup) from absolute to relative by scaling THRESH by the adjacent diagonal entries:
RESTART11 = |B11E|^2+|BULGE|^2 <= (THRESH * MAX(|B11D(I-1)|,|B11D(I)|,UNFL))^2
This mirrors DBDSQR's relative convergence check |E| <= TOL*|D|. Applied to all 4 bidiagonal blocks (B11/B21/B12/B22) at all 3 check-points in the iteration.
Fixes #965