summaryrefslogtreecommitdiff
path: root/SRC/clanhe.f
diff options
context:
space:
mode:
Diffstat (limited to 'SRC/clanhe.f')
-rw-r--r--SRC/clanhe.f23
1 files changed, 14 insertions, 9 deletions
diff --git a/SRC/clanhe.f b/SRC/clanhe.f
index fb7a36a9..89b26e9d 100644
--- a/SRC/clanhe.f
+++ b/SRC/clanhe.f
@@ -149,14 +149,14 @@
REAL ABSA, SCALE, SUM, VALUE
* ..
* .. External Functions ..
- LOGICAL LSAME
- EXTERNAL LSAME
+ LOGICAL LSAME, SISNAN
+ EXTERNAL LSAME, SISNAN
* ..
* .. External Subroutines ..
EXTERNAL CLASSQ
* ..
* .. Intrinsic Functions ..
- INTRINSIC ABS, MAX, REAL, SQRT
+ INTRINSIC ABS, REAL, 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. SISNAN( SUM ) ) VALUE = SUM
10 CONTINUE
- VALUE = MAX( VALUE, ABS( REAL( A( J, J ) ) ) )
+ SUM = ABS( REAL( A( J, J ) ) )
+ IF( VALUE .LT. SUM .OR. SISNAN( SUM ) ) VALUE = SUM
20 CONTINUE
ELSE
DO 40 J = 1, N
- VALUE = MAX( VALUE, ABS( REAL( A( J, J ) ) ) )
+ SUM = ABS( REAL( A( J, J ) ) )
+ IF( VALUE .LT. SUM .OR. SISNAN( 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. SISNAN( SUM ) ) VALUE = SUM
30 CONTINUE
40 CONTINUE
END IF
@@ -199,7 +203,8 @@
WORK( J ) = SUM + ABS( REAL( A( J, J ) ) )
60 CONTINUE
DO 70 I = 1, N
- VALUE = MAX( VALUE, WORK( I ) )
+ SUM = WORK( I )
+ IF( VALUE .LT. SUM .OR. SISNAN( 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. SISNAN( SUM ) ) VALUE = SUM
100 CONTINUE
END IF
ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN