Skip to content

Commit db0abe5

Browse files
Improve dlaed4 thanks to Li, Ren-Cang
1 parent a7c0392 commit db0abe5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
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

0 commit comments

Comments
 (0)