245 DOUBLE PRECISION FUNCTION zlanhf( NORM, TRANSR, UPLO, N, A, WORK )
252 CHARACTER norm, transr, uplo
256 DOUBLE PRECISION work( 0: * )
263 DOUBLE PRECISION one, zero
264 parameter( one = 1.0d+0, zero = 0.0d+0 )
267 INTEGER i, j, ifm, ilu, noe, n1, k, l, lda
268 DOUBLE PRECISION scale, s,
VALUE, aa, temp
278 INTRINSIC abs, dble, 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( dble( a( j+j*lda ) ) )
339 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
342 temp = abs( a( i+j*lda ) )
343 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
348 temp = abs( a( i+j*lda ) )
349 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
354 temp = abs( dble( a( i+j*lda ) ) )
355 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
359 temp = abs( dble( a( i+j*lda ) ) )
360 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
363 temp = abs( a( i+j*lda ) )
364 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
372 temp = abs( a( i+j*lda ) )
373 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
378 temp = abs( dble( a( i+j*lda ) ) )
379 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
383 temp = abs( dble( a( i+j*lda ) ) )
384 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
386 DO i = k + j + 1, n - 1
387 temp = abs( a( i+j*lda ) )
388 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
393 temp = abs( a( i+j*lda ) )
394 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
399 temp = abs( dble( a( i+j*lda ) ) )
400 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
409 temp = abs( a( i+j*lda ) )
410 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
415 temp = abs( dble( a( i+j*lda ) ) )
416 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
420 temp = abs( dble( a( i+j*lda ) ) )
421 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
424 temp = abs( a( i+j*lda ) )
425 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
431 temp = abs( a( i+j*lda ) )
432 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
437 temp = abs( dble( a( i+j*lda ) ) )
438 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
442 temp = abs( a( i+j*lda ) )
443 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
451 temp = abs( a( i+j*lda ) )
452 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
458 temp = abs( dble( a( 0+j*lda ) ) )
459 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
462 temp = abs( a( i+j*lda ) )
463 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
468 temp = abs( a( i+j*lda ) )
469 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
474 temp = abs( dble( a( i+j*lda ) ) )
475 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
479 temp = abs( dble( a( i+j*lda ) ) )
480 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
482 DO i = j - k + 2, k - 1
483 temp = abs( a( i+j*lda ) )
484 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
498 temp = abs( dble( a( j+j*lda ) ) )
499 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
501 temp = abs( dble( a( j+1+j*lda ) ) )
502 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
505 temp = abs( a( i+j*lda ) )
506 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
511 temp = abs( a( i+j*lda ) )
512 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
517 temp = abs( dble( a( i+j*lda ) ) )
518 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
522 temp = abs( dble( a( i+j*lda ) ) )
523 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
526 temp = abs( a( i+j*lda ) )
527 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
535 temp = abs( a( i+j*lda ) )
536 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
541 temp = abs( dble( a( i+j*lda ) ) )
542 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
546 temp = abs( dble( a( i+j*lda ) ) )
547 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
550 temp = abs( a( i+j*lda ) )
551 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
556 temp = abs( a( i+j*lda ) )
557 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
562 temp = abs( dble( a( i+j*lda ) ) )
563 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
567 temp = abs( dble( a( i+j*lda ) ) )
568 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
577 temp = abs( dble( a( j+j*lda ) ) )
578 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
581 temp = abs( a( i+j*lda ) )
582 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
587 temp = abs( a( i+j*lda ) )
588 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
593 temp = abs( dble( a( i+j*lda ) ) )
594 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
598 temp = abs( dble( a( i+j*lda ) ) )
599 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
602 temp = abs( a( i+j*lda ) )
603 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
609 temp = abs( a( i+j*lda ) )
610 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
615 temp = abs( dble( a( i+j*lda ) ) )
616 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
620 temp = abs( a( i+j*lda ) )
621 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
629 temp = abs( a( i+j*lda ) )
630 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
636 temp = abs( dble( a( 0+j*lda ) ) )
637 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
640 temp = abs( a( i+j*lda ) )
641 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
646 temp = abs( a( i+j*lda ) )
647 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
652 temp = abs( dble( a( i+j*lda ) ) )
653 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
657 temp = abs( dble( a( i+j*lda ) ) )
658 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
660 DO i = j - k + 1, k - 1
661 temp = abs( a( i+j*lda ) )
662 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
668 temp = abs( a( i+j*lda ) )
669 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
674 temp = abs( dble( a( i+j*lda ) ) )
675 IF(
VALUE .LT. temp .OR.
disnan( 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( dble( a( i+j*lda ) ) )
709 aa = abs( dble( 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.
disnan( temp ) )
739 aa = abs( a( i+j*lda ) )
742 work( i+k ) = work( i+k ) + aa
745 aa = abs( dble( a( i+j*lda ) ) )
748 work( i+k ) = work( i+k ) + s
752 aa = abs( dble( 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.
disnan( temp ) )
782 aa = abs( a( i+j*lda ) )
785 work( i ) = work( i ) + aa
787 aa = abs( dble( a( i+j*lda ) ) )
791 aa = abs( dble( 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.
disnan( temp ) )
818 aa = abs( a( i+j*lda ) )
821 work( i+k ) = work( i+k ) + aa
823 aa = abs( dble( a( i+j*lda ) ) )
826 work( i+k ) = work( i+k ) + s
829 aa = abs( dble( 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.
disnan( temp ) )
867 aa = abs( a( i+j*lda ) )
869 work( i+n1 ) = work( i+n1 ) + aa
875 s = abs( dble( 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( dble( a( i+j*lda ) ) )
896 work( j-k ) = work( j-k ) + s
898 s = abs( dble( 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.
disnan( temp ) )
926 aa = abs( a( i+j*lda ) )
928 work( i ) = work( i ) + aa
931 aa = abs( dble( a( i+j*lda ) ) )
938 aa = abs( dble( 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( dble( 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.
disnan( temp ) )
991 aa = abs( a( i+j*lda ) )
993 work( i+k ) = work( i+k ) + aa
999 aa = abs( dble( 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( dble( a( i+j*lda ) ) )
1021 work( j-k-1 ) = work( j-k-1 ) + s
1023 aa = abs( dble( 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( dble( a( i+j*lda ) ) )
1047 work( i ) = work( i ) + s
1051 IF(
VALUE .LT. temp .OR.
disnan( temp ) )
1060 s = abs( dble( 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( dble( a( i+j*lda ) ) )
1085 aa = abs( dble( 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( dble( 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.
disnan( temp ) )
1132 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
1146 CALL zlassq( k-j-2, a( k+j+1+j*lda ), 1, scale, s )
1150 CALL zlassq( 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 = dble( 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 zlassq( n-j-1, a( j+1+j*lda ), 1, scale, s )
1197 CALL zlassq( 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 = dble( 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 zlassq( j, a( 0+( k+j )*lda ), 1, scale, s )
1247 CALL zlassq( k, a( 0+j*lda ), 1, scale, s )
1251 CALL zlassq( 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 = dble( 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 zlassq( j, a( 0+j*lda ), 1, scale, s )
1301 CALL zlassq( k, a( 0+j*lda ), 1, scale, s )
1305 CALL zlassq( 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 = dble( 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 zlassq( k-j-1, a( k+j+2+j*lda ), 1, scale, s )
1359 CALL zlassq( 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 = dble( 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 zlassq( n-j-1, a( j+2+j*lda ), 1, scale, s )
1396 CALL zlassq( 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 = dble( 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 zlassq( j, a( 0+( k+1+j )*lda ), 1, scale, s )
1436 CALL zlassq( k, a( 0+j*lda ), 1, scale, s )
1440 CALL zlassq( 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 = dble( 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 zlassq( j, a( 0+( j+1 )*lda ), 1, scale, s )
1502 CALL zlassq( k, a( 0+j*lda ), 1, scale, s )
1506 CALL zlassq( 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 = dble( 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 disnan(din)
DISNAN tests input for NaN.
double precision function zlanhf(norm, transr, uplo, n, a, work)
ZLANHF returns the value of the 1-norm, or the Frobenius norm, or the infinity norm,...
subroutine zlassq(n, x, incx, scale, sumsq)
ZLASSQ updates a sum of squares represented in scaled form.
logical function lsame(ca, cb)
LSAME