Skip to content

Commit 96bd210

Browse files
authored
Merge pull request #655 from weslleyspereira/try-improve-convergence-dlaed4
Try improve convergence dlaed4
2 parents 79a37b2 + 5a392d9 commit 96bd210

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

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

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)