diff options
Diffstat (limited to 'SRC/dlansp.f')
-rw-r--r-- | SRC/dlansp.f | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/SRC/dlansp.f b/SRC/dlansp.f index 96adcf6f..6f8d8ec9 100644 --- a/SRC/dlansp.f +++ b/SRC/dlansp.f @@ -141,11 +141,11 @@ EXTERNAL DLASSQ * .. * .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME + LOGICAL LSAME, DISNAN + EXTERNAL LSAME, DISNAN * .. * .. Intrinsic Functions .. - INTRINSIC ABS, MAX, SQRT + INTRINSIC ABS, SQRT * .. * .. Executable Statements .. * @@ -160,7 +160,8 @@ K = 1 DO 20 J = 1, N DO 10 I = K, K + J - 1 - VALUE = MAX( VALUE, ABS( AP( I ) ) ) + SUM = ABS( AP( I ) ) + IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM 10 CONTINUE K = K + J 20 CONTINUE @@ -168,7 +169,8 @@ K = 1 DO 40 J = 1, N DO 30 I = K, K + N - J - VALUE = MAX( VALUE, ABS( AP( I ) ) ) + SUM = ABS( AP( I ) ) + IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM 30 CONTINUE K = K + N - J + 1 40 CONTINUE @@ -193,7 +195,8 @@ K = K + 1 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 @@ -208,7 +211,7 @@ WORK( I ) = WORK( I ) + ABSA K = K + 1 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 |