Skip to content

Commit afcd7e8

Browse files
authored
Improve convergence of DLAED4/SLAED4 (Reference-LAPACK PR655)
1 parent 880a3fb commit afcd7e8

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

lapack-netlib/SRC/dlaed4.f

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,12 @@ SUBROUTINE DLAED4( N, I, D, Z, DELTA, RHO, DLAM, INFO )
328328
IF( C.LT.ZERO )
329329
$ C = ABS( C )
330330
IF( C.EQ.ZERO ) THEN
331-
* ETA = B/A
331+
* ETA = B/A
332332
* ETA = RHO - TAU
333-
ETA = DLTUB - TAU
333+
* ETA = DLTUB - TAU
334+
*
335+
* Update proposed by Li, Ren-Cang:
336+
ETA = -W / ( DPSI+DPHI )
334337
ELSE IF( A.GE.ZERO ) THEN
335338
ETA = ( A+SQRT( ABS( A*A-FOUR*B*C ) ) ) / ( TWO*C )
336339
ELSE

lapack-netlib/SRC/slaed4.f

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,12 @@ SUBROUTINE SLAED4( N, I, D, Z, DELTA, RHO, DLAM, INFO )
328328
IF( C.LT.ZERO )
329329
$ C = ABS( C )
330330
IF( C.EQ.ZERO ) THEN
331-
* ETA = B/A
331+
* ETA = B/A
332332
* ETA = RHO - TAU
333-
ETA = DLTUB - TAU
333+
* ETA = DLTUB - TAU
334+
*
335+
* Update proposed by Li, Ren-Cang:
336+
ETA = -W / ( DPSI+DPHI )
334337
ELSE IF( A.GE.ZERO ) THEN
335338
ETA = ( A+SQRT( ABS( A*A-FOUR*B*C ) ) ) / ( TWO*C )
336339
ELSE

0 commit comments

Comments
 (0)