summaryrefslogtreecommitdiff
path: root/SRC/clanhb.f
diff options
context:
space:
mode:
Diffstat (limited to 'SRC/clanhb.f')
-rw-r--r--SRC/clanhb.f21
1 files changed, 13 insertions, 8 deletions
diff --git a/SRC/clanhb.f b/SRC/clanhb.f
index a0a70cc3..b879dcc9 100644
--- a/SRC/clanhb.f
+++ b/SRC/clanhb.f
@@ -157,8 +157,8 @@
REAL ABSA, SCALE, SUM, VALUE
* ..
* .. External Functions ..
- LOGICAL LSAME
- EXTERNAL LSAME
+ LOGICAL LSAME, SISNAN
+ EXTERNAL LSAME, SISNAN
* ..
* .. External Subroutines ..
EXTERNAL CLASSQ
@@ -178,15 +178,19 @@
IF( LSAME( UPLO, 'U' ) ) THEN
DO 20 J = 1, N
DO 10 I = MAX( K+2-J, 1 ), K
- VALUE = MAX( VALUE, ABS( AB( I, J ) ) )
+ SUM = ABS( AB( I, J ) )
+ IF( VALUE .LT. SUM .OR. SISNAN( SUM ) ) VALUE = SUM
10 CONTINUE
- VALUE = MAX( VALUE, ABS( REAL( AB( K+1, J ) ) ) )
+ SUM = ABS( REAL( AB( K+1, J ) ) )
+ IF( VALUE .LT. SUM .OR. SISNAN( SUM ) ) VALUE = SUM
20 CONTINUE
ELSE
DO 40 J = 1, N
- VALUE = MAX( VALUE, ABS( REAL( AB( 1, J ) ) ) )
+ SUM = ABS( REAL( AB( 1, J ) ) )
+ IF( VALUE .LT. SUM .OR. SISNAN( SUM ) ) VALUE = SUM
DO 30 I = 2, MIN( N+1-J, K+1 )
- VALUE = MAX( VALUE, ABS( AB( I, J ) ) )
+ SUM = ABS( AB( I, J ) )
+ IF( VALUE .LT. SUM .OR. SISNAN( SUM ) ) VALUE = SUM
30 CONTINUE
40 CONTINUE
END IF
@@ -208,7 +212,8 @@
WORK( J ) = SUM + ABS( REAL( AB( K+1, 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
@@ -222,7 +227,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