diff options
Diffstat (limited to 'SRC/zlange.f')
-rw-r--r-- | SRC/zlange.f | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/SRC/zlange.f b/SRC/zlange.f index 4fcd0eed..56e0bc6d 100644 --- a/SRC/zlange.f +++ b/SRC/zlange.f @@ -137,17 +137,17 @@ * .. * .. Local Scalars .. INTEGER I, J - DOUBLE PRECISION SCALE, SUM, VALUE + DOUBLE PRECISION SCALE, SUM, VALUE, TEMP * .. * .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME + LOGICAL LSAME, DISNAN + EXTERNAL LSAME, DISNAN * .. * .. External Subroutines .. EXTERNAL ZLASSQ * .. * .. Intrinsic Functions .. - INTRINSIC ABS, MAX, MIN, SQRT + INTRINSIC ABS, MIN, SQRT * .. * .. Executable Statements .. * @@ -160,7 +160,8 @@ VALUE = ZERO DO 20 J = 1, N DO 10 I = 1, M - VALUE = MAX( VALUE, ABS( A( I, J ) ) ) + TEMP = ABS( A( I, J ) ) + IF( VALUE.LT.TEMP .OR. DISNAN( TEMP ) ) VALUE = TEMP 10 CONTINUE 20 CONTINUE ELSE IF( ( LSAME( NORM, 'O' ) ) .OR. ( NORM.EQ.'1' ) ) THEN @@ -173,7 +174,7 @@ DO 30 I = 1, M SUM = SUM + ABS( A( I, J ) ) 30 CONTINUE - VALUE = MAX( VALUE, SUM ) + IF( VALUE.LT.SUM .OR. DISNAN( SUM ) ) VALUE = SUM 40 CONTINUE ELSE IF( LSAME( NORM, 'I' ) ) THEN * @@ -189,7 +190,8 @@ 70 CONTINUE VALUE = ZERO DO 80 I = 1, M - VALUE = MAX( VALUE, WORK( I ) ) + TEMP = WORK( I ) + IF( VALUE.LT.TEMP .OR. DISNAN( TEMP ) ) VALUE = TEMP 80 CONTINUE ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN * |