Skip to content

Commit

Permalink
{D,Z}BBCSD: stricter zero criterion
Browse files Browse the repository at this point in the history
The tolerance below which matrix entries are considered zero is
tightened to avoid insufficiently accurate singular vectors.

fixes Reference-LAPACK#965
  • Loading branch information
christoph-conrads committed Jan 19, 2024
1 parent add9497 commit fdca6a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions SRC/dbbcsd.f
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
* =========================
*>
*> \verbatim
*> TOLMUL DOUBLE PRECISION, default = MAX(10,MIN(100,EPS**(-1/8)))
*> TOLMUL DOUBLE PRECISION, default = 10
*> TOLMUL controls the convergence criterion of the QR loop.
*> Angles THETA(i), PHI(i) are rounded to 0 or PI/2 when they
*> are within TOLMUL*EPS of either bound.
Expand Down Expand Up @@ -451,7 +451,7 @@ SUBROUTINE DBBCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS, M, P, Q,
*
EPS = DLAMCH( 'Epsilon' )
UNFL = DLAMCH( 'Safe minimum' )
TOLMUL = MAX( TEN, MIN( HUNDRED, EPS**MEIGHTH ) )
TOLMUL = TEN
TOL = TOLMUL*EPS
THRESH = MAX( TOL, MAXITR*Q*Q*UNFL )
*
Expand Down
4 changes: 2 additions & 2 deletions SRC/zbbcsd.f
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
* =========================
*>
*> \verbatim
*> TOLMUL DOUBLE PRECISION, default = MAX(10,MIN(100,EPS**(-1/8)))
*> TOLMUL DOUBLE PRECISION, default = 10
*> TOLMUL controls the convergence criterion of the QR loop.
*> Angles THETA(i), PHI(i) are rounded to 0 or PI/2 when they
*> are within TOLMUL*EPS of either bound.
Expand Down Expand Up @@ -450,7 +450,7 @@ SUBROUTINE ZBBCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS, M, P, Q,
*
EPS = DLAMCH( 'Epsilon' )
UNFL = DLAMCH( 'Safe minimum' )
TOLMUL = MAX( TEN, MIN( HUNDRED, EPS**MEIGHTH ) )
TOLMUL = TEN
TOL = TOLMUL*EPS
THRESH = MAX( TOL, MAXITR*Q*Q*UNFL )
*
Expand Down

0 comments on commit fdca6a3

Please sign in to comment.