245 REAL function
clanhf( norm, transr, uplo, n, a, work )
252 CHARACTER norm, transr, uplo
264 parameter( one = 1.0e+0, zero = 0.0e+0 )
267 INTEGER i, j, ifm, ilu, noe, n1, k, l, lda
268 REAL scale, s,
VALUE, aa, temp
278 INTRINSIC abs, real, sqrt
285 ELSE IF( n.EQ.1 )
THEN
293 IF( mod( n, 2 ).EQ.0 )
299 IF(
lsame( transr,
'C' ) )
305 IF(
lsame( uplo,
'U' ) )
324 IF(
lsame( norm,
'M' ) )
THEN
338 temp = abs( real( a( j+j*lda ) ) )
339 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
342 temp = abs( a( i+j*lda ) )
343 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
348 temp = abs( a( i+j*lda ) )
349 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
354 temp = abs( real( a( i+j*lda ) ) )
355 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
359 temp = abs( real( a( i+j*lda ) ) )
360 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
363 temp = abs( a( i+j*lda ) )
364 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
372 temp = abs( a( i+j*lda ) )
373 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
378 temp = abs( real( a( i+j*lda ) ) )
379 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
383 temp = abs( real( a( i+j*lda ) ) )
384 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
386 DO i = k + j + 1, n - 1
387 temp = abs( a( i+j*lda ) )
388 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
393 temp = abs( a( i+j*lda ) )
394 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
399 temp = abs( real( a( i+j*lda ) ) )
400 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
409 temp = abs( a( i+j*lda ) )
410 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
415 temp = abs( real( a( i+j*lda ) ) )
416 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
420 temp = abs( real( a( i+j*lda ) ) )
421 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
424 temp = abs( a( i+j*lda ) )
425 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
431 temp = abs( a( i+j*lda ) )
432 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
437 temp = abs( real( a( i+j*lda ) ) )
438 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
442 temp = abs( a( i+j*lda ) )
443 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
451 temp = abs( a( i+j*lda ) )
452 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
458 temp = abs( real( a( 0+j*lda ) ) )
459 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
462 temp = abs( a( i+j*lda ) )
463 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
468 temp = abs( a( i+j*lda ) )
469 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
474 temp = abs( real( a( i+j*lda ) ) )
475 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
479 temp = abs( real( a( i+j*lda ) ) )
480 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
482 DO i = j - k + 2, k - 1
483 temp = abs( a( i+j*lda ) )
484 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
498 temp = abs( real( a( j+j*lda ) ) )
499 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
501 temp = abs( real( a( j+1+j*lda ) ) )
502 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
505 temp = abs( a( i+j*lda ) )
506 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
511 temp = abs( a( i+j*lda ) )
512 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
517 temp = abs( real( a( i+j*lda ) ) )
518 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
522 temp = abs( real( a( i+j*lda ) ) )
523 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
526 temp = abs( a( i+j*lda ) )
527 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
535 temp = abs( a( i+j*lda ) )
536 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
541 temp = abs( real( a( i+j*lda ) ) )
542 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
546 temp = abs( real( a( i+j*lda ) ) )
547 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
550 temp = abs( a( i+j*lda ) )
551 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
556 temp = abs( a( i+j*lda ) )
557 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
562 temp = abs( real( a( i+j*lda ) ) )
563 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
567 temp = abs( real( a( i+j*lda ) ) )
568 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
577 temp = abs( real( a( j+j*lda ) ) )
578 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
581 temp = abs( a( i+j*lda ) )
582 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
587 temp = abs( a( i+j*lda ) )
588 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
593 temp = abs( real( a( i+j*lda ) ) )
594 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
598 temp = abs( real( a( i+j*lda ) ) )
599 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
602 temp = abs( a( i+j*lda ) )
603 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
609 temp = abs( a( i+j*lda ) )
610 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
615 temp = abs( real( a( i+j*lda ) ) )
616 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
620 temp = abs( a( i+j*lda ) )
621 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
629 temp = abs( a( i+j*lda ) )
630 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
636 temp = abs( real( a( 0+j*lda ) ) )
637 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
640 temp = abs( a( i+j*lda ) )
641 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
646 temp = abs( a( i+j*lda ) )
647 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
652 temp = abs( real( a( i+j*lda ) ) )
653 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
657 temp = abs( real( a( i+j*lda ) ) )
658 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
660 DO i = j - k + 1, k - 1
661 temp = abs( a( i+j*lda ) )
662 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
668 temp = abs( a( i+j*lda ) )
669 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
674 temp = abs( real( a( i+j*lda ) ) )
675 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
680 ELSE IF( (
lsame( norm,
'I' ) ) .OR. (
lsame( norm,
'O' ) ) .OR.
681 $ ( norm.EQ.
'1' ) )
THEN
698 aa = abs( a( i+j*lda ) )
701 work( i ) = work( i ) + aa
703 aa = abs( real( a( i+j*lda ) ) )
709 aa = abs( real( a( i+j*lda ) ) )
711 work( j ) = work( j ) + aa
715 aa = abs( a( i+j*lda ) )
718 work( l ) = work( l ) + aa
720 work( j ) = work( j ) + s
726 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
739 aa = abs( a( i+j*lda ) )
742 work( i+k ) = work( i+k ) + aa
745 aa = abs( real( a( i+j*lda ) ) )
748 work( i+k ) = work( i+k ) + s
752 aa = abs( real( a( i+j*lda ) ) )
758 aa = abs( a( i+j*lda ) )
761 work( l ) = work( l ) + aa
763 work( j ) = work( j ) + s
768 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
782 aa = abs( a( i+j*lda ) )
785 work( i ) = work( i ) + aa
787 aa = abs( real( a( i+j*lda ) ) )
791 aa = abs( real( a( i+j*lda ) ) )
793 work( j ) = work( j ) + aa
797 aa = abs( a( i+j*lda ) )
800 work( l ) = work( l ) + aa
802 work( j ) = work( j ) + s
807 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
818 aa = abs( a( i+j*lda ) )
821 work( i+k ) = work( i+k ) + aa
823 aa = abs( real( a( i+j*lda ) ) )
826 work( i+k ) = work( i+k ) + s
829 aa = abs( real( a( i+j*lda ) ) )
835 aa = abs( a( i+j*lda ) )
838 work( l ) = work( l ) + aa
840 work( j ) = work( j ) + s
845 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
867 aa = abs( a( i+j*lda ) )
869 work( i+n1 ) = work( i+n1 ) + aa
875 s = abs( real( a( 0+j*lda ) ) )
878 aa = abs( a( i+j*lda ) )
880 work( i+n1 ) = work( i+n1 ) + aa
883 work( j ) = work( j ) + s
887 aa = abs( a( i+j*lda ) )
889 work( i ) = work( i ) + aa
893 aa = abs( real( a( i+j*lda ) ) )
896 work( j-k ) = work( j-k ) + s
898 s = abs( real( a( i+j*lda ) ) )
902 aa = abs( a( i+j*lda ) )
904 work( l ) = work( l ) + aa
907 work( j ) = work( j ) + s
912 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
926 aa = abs( a( i+j*lda ) )
928 work( i ) = work( i ) + aa
931 aa = abs( real( a( i+j*lda ) ) )
938 aa = abs( real( a( i+j*lda ) ) )
940 DO l = k + j + 1, n - 1
942 aa = abs( a( i+j*lda ) )
945 work( l ) = work( l ) + aa
947 work( k+j ) = work( k+j ) + s
952 aa = abs( a( i+j*lda ) )
954 work( i ) = work( i ) + aa
958 aa = abs( real( a( i+j*lda ) ) )
967 aa = abs( a( i+j*lda ) )
969 work( i ) = work( i ) + aa
972 work( j ) = work( j ) + s
977 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
991 aa = abs( a( i+j*lda ) )
993 work( i+k ) = work( i+k ) + aa
999 aa = abs( real( a( 0+j*lda ) ) )
1003 aa = abs( a( i+j*lda ) )
1005 work( i+k ) = work( i+k ) + aa
1008 work( j ) = work( j ) + s
1012 aa = abs( a( i+j*lda ) )
1014 work( i ) = work( i ) + aa
1018 aa = abs( real( a( i+j*lda ) ) )
1021 work( j-k-1 ) = work( j-k-1 ) + s
1023 aa = abs( real( a( i+j*lda ) ) )
1028 aa = abs( a( i+j*lda ) )
1030 work( l ) = work( l ) + aa
1033 work( j ) = work( j ) + s
1038 aa = abs( a( i+j*lda ) )
1040 work( i ) = work( i ) + aa
1044 aa = abs( real( a( i+j*lda ) ) )
1047 work( i ) = work( i ) + s
1051 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
1060 s = abs( real( a( 0 ) ) )
1065 work( i+k ) = work( i+k ) + aa
1068 work( k ) = work( k ) + s
1073 aa = abs( a( i+j*lda ) )
1075 work( i ) = work( i ) + aa
1078 aa = abs( real( a( i+j*lda ) ) )
1085 aa = abs( real( a( i+j*lda ) ) )
1087 DO l = k + j + 1, n - 1
1089 aa = abs( a( i+j*lda ) )
1092 work( l ) = work( l ) + aa
1094 work( k+j ) = work( k+j ) + s
1099 aa = abs( a( i+j*lda ) )
1101 work( i ) = work( i ) + aa
1106 aa = abs( real( a( i+j*lda ) ) )
1116 aa = abs( a( i+j*lda ) )
1118 work( i ) = work( i ) + aa
1121 work( j-1 ) = work( j-1 ) + s
1126 IF(
VALUE .LT. temp .OR.
sisnan( temp ) )
1132 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
1146 CALL classq( k-j-2, a( k+j+1+j*lda ), 1, scale, s )
1150 CALL classq( k+j-1, a( 0+j*lda ), 1, scale, s )
1160 IF( aa.NE.zero )
THEN
1161 IF( scale.LT.aa )
THEN
1162 s = one + s*( scale / aa )**2
1165 s = s + ( aa / scale )**2
1168 aa = real( a( l+1 ) )
1170 IF( aa.NE.zero )
THEN
1171 IF( scale.LT.aa )
THEN
1172 s = one + s*( scale / aa )**2
1175 s = s + ( aa / scale )**2
1182 IF( aa.NE.zero )
THEN
1183 IF( scale.LT.aa )
THEN
1184 s = one + s*( scale / aa )**2
1187 s = s + ( aa / scale )**2
1193 CALL classq( n-j-1, a( j+1+j*lda ), 1, scale, s )
1197 CALL classq( j, a( 0+( 1+j )*lda ), 1, scale, s )
1204 IF( aa.NE.zero )
THEN
1205 IF( scale.LT.aa )
THEN
1206 s = one + s*( scale / aa )**2
1209 s = s + ( aa / scale )**2
1217 IF( aa.NE.zero )
THEN
1218 IF( scale.LT.aa )
THEN
1219 s = one + s*( scale / aa )**2
1222 s = s + ( aa / scale )**2
1225 aa = real( a( l+1 ) )
1227 IF( aa.NE.zero )
THEN
1228 IF( scale.LT.aa )
THEN
1229 s = one + s*( scale / aa )**2
1232 s = s + ( aa / scale )**2
1243 CALL classq( j, a( 0+( k+j )*lda ), 1, scale, s )
1247 CALL classq( k, a( 0+j*lda ), 1, scale, s )
1251 CALL classq( k-j-1, a( j+1+( j+k-1 )*lda ), 1,
1261 IF( aa.NE.zero )
THEN
1262 IF( scale.LT.aa )
THEN
1263 s = one + s*( scale / aa )**2
1266 s = s + ( aa / scale )**2
1274 IF( aa.NE.zero )
THEN
1275 IF( scale.LT.aa )
THEN
1276 s = one + s*( scale / aa )**2
1279 s = s + ( aa / scale )**2
1282 aa = real( a( l+1 ) )
1284 IF( aa.NE.zero )
THEN
1285 IF( scale.LT.aa )
THEN
1286 s = one + s*( scale / aa )**2
1289 s = s + ( aa / scale )**2
1297 CALL classq( j, a( 0+j*lda ), 1, scale, s )
1301 CALL classq( k, a( 0+j*lda ), 1, scale, s )
1305 CALL classq( k-j-2, a( j+2+j*lda ), 1, scale, s )
1315 IF( aa.NE.zero )
THEN
1316 IF( scale.LT.aa )
THEN
1317 s = one + s*( scale / aa )**2
1320 s = s + ( aa / scale )**2
1323 aa = real( a( l+1 ) )
1325 IF( aa.NE.zero )
THEN
1326 IF( scale.LT.aa )
THEN
1327 s = one + s*( scale / aa )**2
1330 s = s + ( aa / scale )**2
1338 IF( aa.NE.zero )
THEN
1339 IF( scale.LT.aa )
THEN
1340 s = one + s*( scale / aa )**2
1343 s = s + ( aa / scale )**2
1355 CALL classq( k-j-1, a( k+j+2+j*lda ), 1, scale, s )
1359 CALL classq( k+j, a( 0+j*lda ), 1, scale, s )
1369 IF( aa.NE.zero )
THEN
1370 IF( scale.LT.aa )
THEN
1371 s = one + s*( scale / aa )**2
1374 s = s + ( aa / scale )**2
1377 aa = real( a( l+1 ) )
1379 IF( aa.NE.zero )
THEN
1380 IF( scale.LT.aa )
THEN
1381 s = one + s*( scale / aa )**2
1384 s = s + ( aa / scale )**2
1392 CALL classq( n-j-1, a( j+2+j*lda ), 1, scale, s )
1396 CALL classq( j, a( 0+j*lda ), 1, scale, s )
1406 IF( aa.NE.zero )
THEN
1407 IF( scale.LT.aa )
THEN
1408 s = one + s*( scale / aa )**2
1411 s = s + ( aa / scale )**2
1414 aa = real( a( l+1 ) )
1416 IF( aa.NE.zero )
THEN
1417 IF( scale.LT.aa )
THEN
1418 s = one + s*( scale / aa )**2
1421 s = s + ( aa / scale )**2
1432 CALL classq( j, a( 0+( k+1+j )*lda ), 1, scale, s )
1436 CALL classq( k, a( 0+j*lda ), 1, scale, s )
1440 CALL classq( k-j-1, a( j+1+( j+k )*lda ), 1, scale,
1450 IF( aa.NE.zero )
THEN
1451 IF( scale.LT.aa )
THEN
1452 s = one + s*( scale / aa )**2
1455 s = s + ( aa / scale )**2
1463 IF( aa.NE.zero )
THEN
1464 IF( scale.LT.aa )
THEN
1465 s = one + s*( scale / aa )**2
1468 s = s + ( aa / scale )**2
1471 aa = real( a( l+1 ) )
1473 IF( aa.NE.zero )
THEN
1474 IF( scale.LT.aa )
THEN
1475 s = one + s*( scale / aa )**2
1478 s = s + ( aa / scale )**2
1487 IF( aa.NE.zero )
THEN
1488 IF( scale.LT.aa )
THEN
1489 s = one + s*( scale / aa )**2
1492 s = s + ( aa / scale )**2
1498 CALL classq( j, a( 0+( j+1 )*lda ), 1, scale, s )
1502 CALL classq( k, a( 0+j*lda ), 1, scale, s )
1506 CALL classq( k-j-1, a( j+1+j*lda ), 1, scale, s )
1515 IF( aa.NE.zero )
THEN
1516 IF( scale.LT.aa )
THEN
1517 s = one + s*( scale / aa )**2
1520 s = s + ( aa / scale )**2
1528 IF( aa.NE.zero )
THEN
1529 IF( scale.LT.aa )
THEN
1530 s = one + s*( scale / aa )**2
1533 s = s + ( aa / scale )**2
1536 aa = real( a( l+1 ) )
1538 IF( aa.NE.zero )
THEN
1539 IF( scale.LT.aa )
THEN
1540 s = one + s*( scale / aa )**2
1543 s = s + ( aa / scale )**2
1551 IF( aa.NE.zero )
THEN
1552 IF( scale.LT.aa )
THEN
1553 s = one + s*( scale / aa )**2
1556 s = s + ( aa / scale )**2
1562 VALUE = scale*sqrt( s )
logical function sisnan(sin)
SISNAN tests input for NaN.
real function clanhf(norm, transr, uplo, n, a, work)
CLANHF returns the value of the 1-norm, or the Frobenius norm, or the infinity norm,...
subroutine classq(n, x, incx, scale, sumsq)
CLASSQ updates a sum of squares represented in scaled form.
logical function lsame(ca, cb)
LSAME