diff options
Diffstat (limited to 'SRC/zlanhe.f')
-rw-r--r-- | SRC/zlanhe.f | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/SRC/zlanhe.f b/SRC/zlanhe.f index 5a5df2ea..04662ef3 100644 --- a/SRC/zlanhe.f +++ b/SRC/zlanhe.f @@ -149,14 +149,14 @@ DOUBLE PRECISION ABSA, SCALE, SUM, VALUE * .. * .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME + LOGICAL LSAME, DISNAN + EXTERNAL LSAME, DISNAN * .. * .. External Subroutines .. EXTERNAL ZLASSQ * .. * .. Intrinsic Functions .. - INTRINSIC ABS, DBLE, MAX, SQRT + INTRINSIC ABS, DBLE, SQRT * .. * .. Executable Statements .. * @@ -170,15 +170,19 @@ IF( LSAME( UPLO, 'U' ) ) THEN DO 20 J = 1, N DO 10 I = 1, J - 1 - VALUE = MAX( VALUE, ABS( A( I, J ) ) ) + SUM = ABS( A( I, J ) ) + IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM 10 CONTINUE - VALUE = MAX( VALUE, ABS( DBLE( A( J, J ) ) ) ) + SUM = ABS( DBLE( A( J, J ) ) ) + IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM 20 CONTINUE ELSE DO 40 J = 1, N - VALUE = MAX( VALUE, ABS( DBLE( A( J, J ) ) ) ) + SUM = ABS( DBLE( A( J, J ) ) ) + IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM DO 30 I = J + 1, N - VALUE = MAX( VALUE, ABS( A( I, J ) ) ) + SUM = ABS( A( I, J ) ) + IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM 30 CONTINUE 40 CONTINUE END IF @@ -199,7 +203,8 @@ WORK( J ) = SUM + ABS( DBLE( A( J, J ) ) ) 60 CONTINUE DO 70 I = 1, N - VALUE = MAX( VALUE, WORK( I ) ) + SUM = WORK( I ) + IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM 70 CONTINUE ELSE DO 80 I = 1, N @@ -212,7 +217,7 @@ SUM = SUM + ABSA WORK( I ) = WORK( I ) + ABSA 90 CONTINUE - VALUE = MAX( VALUE, SUM ) + IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM 100 CONTINUE END IF ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN |