449 SUBROUTINE ddrvst( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
450 $ NOUNIT, A, LDA, D1, D2, D3, D4, EVEIGS, WA1,
451 $ WA2, WA3, U, LDU, V, TAU, Z, WORK, LWORK,
452 $ IWORK, LIWORK, RESULT, INFO )
459 INTEGER INFO, LDA, LDU, LIWORK, LWORK, NOUNIT, NSIZES,
461 DOUBLE PRECISION THRESH
465 INTEGER ISEED( 4 ), IWORK( * ), NN( * )
466 DOUBLE PRECISION A( LDA, * ), D1( * ), D2( * ), D3( * ),
467 $ d4( * ), eveigs( * ), result( * ), tau( * ),
468 $ u( ldu, * ), v( ldu, * ), wa1( * ), wa2( * ),
469 $ wa3( * ), work( * ), z( ldu, * )
475 DOUBLE PRECISION ZERO, ONE, TWO, TEN
476 PARAMETER ( ZERO = 0.0d0, one = 1.0d0, two = 2.0d0,
478 DOUBLE PRECISION HALF
479 parameter( half = 0.5d0 )
481 parameter( maxtyp = 18 )
486 INTEGER I, IDIAG, IHBW, IINFO, IL, IMODE, INDX, IROW,
487 $ itemp, itype, iu, iuplo, j, j1, j2, jcol,
488 $ jsize, jtype, kd, lgn, liwedc, lwedc, m, m2,
489 $ m3, mtypes, n, nerrs, nmats, nmax, ntest,
491 DOUBLE PRECISION ABSTOL, ANINV, ANORM, COND, OVFL, RTOVFL,
492 $ RTUNFL, TEMP1, TEMP2, TEMP3, ULP, ULPINV, UNFL,
496 INTEGER IDUMMA( 1 ), IOLDSD( 4 ), ISEED2( 4 ),
497 $ ISEED3( 4 ), KMAGN( MAXTYP ), KMODE( MAXTYP ),
501 DOUBLE PRECISION DLAMCH, DLARND, DSXT1
502 EXTERNAL DLAMCH, DLARND, DSXT1
515 COMMON / srnamc / srnamt
518 INTRINSIC abs, dble, int, log, max, min, sqrt
521 DATA ktype / 1, 2, 5*4, 5*5, 3*8, 3*9 /
522 DATA kmagn / 2*1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 3, 1,
524 DATA kmode / 2*0, 4, 3, 1, 4, 4, 4, 3, 1, 4, 4, 0,
542 nmax = max( nmax, nn( j ) )
549 IF( nsizes.LT.0 )
THEN
551 ELSE IF( badnn )
THEN
553 ELSE IF( ntypes.LT.0 )
THEN
555 ELSE IF( lda.LT.nmax )
THEN
557 ELSE IF( ldu.LT.nmax )
THEN
559 ELSE IF( 2*max( 2, nmax )**2.GT.lwork )
THEN
564 CALL xerbla(
'DDRVST', -info )
570 IF( nsizes.EQ.0 .OR. ntypes.EQ.0 )
575 unfl = dlamch(
'Safe minimum' )
576 ovfl = dlamch(
'Overflow' )
578 ulp = dlamch(
'Epsilon' )*dlamch(
'Base' )
580 rtunfl = sqrt( unfl )
581 rtovfl = sqrt( ovfl )
586 iseed2( i ) = iseed( i )
587 iseed3( i ) = iseed( i )
594 DO 1740 jsize = 1, nsizes
597 lgn = int( log( dble( n ) ) / log( two ) )
602 lwedc = 1 + 4*n + 2*n*lgn + 4*n**2
610 aninv = one / dble( max( 1, n ) )
612 IF( nsizes.NE.1 )
THEN
613 mtypes = min( maxtyp, ntypes )
615 mtypes = min( maxtyp+1, ntypes )
618 DO 1730 jtype = 1, mtypes
620 IF( .NOT.dotype( jtype ) )
626 ioldsd( j ) = iseed( j )
644 IF( mtypes.GT.maxtyp )
647 itype = ktype( jtype )
648 imode = kmode( jtype )
652 GO TO ( 40, 50, 60 )kmagn( jtype )
659 anorm = ( rtovfl*ulp )*aninv
663 anorm = rtunfl*n*ulpinv
668 CALL dlaset(
'Full', lda, n, zero, zero, a, lda )
676 IF( itype.EQ.1 )
THEN
679 ELSE IF( itype.EQ.2 )
THEN
684 a( jcol, jcol ) = anorm
687 ELSE IF( itype.EQ.4 )
THEN
691 CALL dlatms( n, n,
'S', iseed,
'S', work, imode, cond,
692 $ anorm, 0, 0,
'N', a, lda, work( n+1 ),
695 ELSE IF( itype.EQ.5 )
THEN
699 CALL dlatms( n, n,
'S', iseed,
'S', work, imode, cond,
700 $ anorm, n, n,
'N', a, lda, work( n+1 ),
703 ELSE IF( itype.EQ.7 )
THEN
708 CALL dlatmr( n, n,
'S', iseed,
'S', work, 6, one, one,
709 $
'T',
'N', work( n+1 ), 1, one,
710 $ work( 2*n+1 ), 1, one,
'N', idumma, 0, 0,
711 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
713 ELSE IF( itype.EQ.8 )
THEN
718 CALL dlatmr( n, n,
'S', iseed,
'S', work, 6, one, one,
719 $
'T',
'N', work( n+1 ), 1, one,
720 $ work( 2*n+1 ), 1, one,
'N', idumma, n, n,
721 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
723 ELSE IF( itype.EQ.9 )
THEN
727 ihbw = int( ( n-1 )*dlarnd( 1, iseed3 ) )
728 CALL dlatms( n, n,
'S', iseed,
'S', work, imode, cond,
729 $ anorm, ihbw, ihbw,
'Z', u, ldu, work( n+1 ),
734 CALL dlaset(
'Full', lda, n, zero, zero, a, lda )
735 DO 100 idiag = -ihbw, ihbw
736 irow = ihbw - idiag + 1
737 j1 = max( 1, idiag+1 )
738 j2 = min( n, n+idiag )
741 a( i, j ) = u( irow, j )
748 IF( iinfo.NE.0 )
THEN
749 WRITE( nounit, fmt = 9999 )
'Generator', iinfo, n, jtype,
762 il = 1 + ( n-1 )*int( dlarnd( 1, iseed2 ) )
763 iu = 1 + ( n-1 )*int( dlarnd( 1, iseed2 ) )
773 IF( jtype.LE.7 )
THEN
776 d1( i ) = dble( a( i, i ) )
779 d2( i ) = dble( a( i+1, i ) )
782 CALL dstev(
'V', n, d1, d2, z, ldu, work, iinfo )
783 IF( iinfo.NE.0 )
THEN
784 WRITE( nounit, fmt = 9999 )
'DSTEV(V)', iinfo, n,
787 IF( iinfo.LT.0 )
THEN
800 d3( i ) = dble( a( i, i ) )
803 d4( i ) = dble( a( i+1, i ) )
805 CALL dstt21( n, 0, d3, d4, d1, d2, z, ldu, work,
810 d4( i ) = dble( a( i+1, i ) )
813 CALL dstev(
'N', n, d3, d4, z, ldu, work, iinfo )
814 IF( iinfo.NE.0 )
THEN
815 WRITE( nounit, fmt = 9999 )
'DSTEV(N)', iinfo, n,
818 IF( iinfo.LT.0 )
THEN
831 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
832 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
834 result( 3 ) = temp2 / max( unfl,
835 $ ulp*max( temp1, temp2 ) )
841 eveigs( i ) = d3( i )
842 d1( i ) = dble( a( i, i ) )
845 d2( i ) = dble( a( i+1, i ) )
848 CALL dstevx(
'V',
'A', n, d1, d2, vl, vu, il, iu, abstol,
849 $ m, wa1, z, ldu, work, iwork, iwork( 5*n+1 ),
851 IF( iinfo.NE.0 )
THEN
852 WRITE( nounit, fmt = 9999 )
'DSTEVX(V,A)', iinfo, n,
855 IF( iinfo.LT.0 )
THEN
865 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
873 d3( i ) = dble( a( i, i ) )
876 d4( i ) = dble( a( i+1, i ) )
878 CALL dstt21( n, 0, d3, d4, wa1, d2, z, ldu, work,
883 d4( i ) = dble( a( i+1, i ) )
886 CALL dstevx(
'N',
'A', n, d3, d4, vl, vu, il, iu, abstol,
887 $ m2, wa2, z, ldu, work, iwork,
888 $ iwork( 5*n+1 ), iinfo )
889 IF( iinfo.NE.0 )
THEN
890 WRITE( nounit, fmt = 9999 )
'DSTEVX(N,A)', iinfo, n,
893 IF( iinfo.LT.0 )
THEN
906 temp1 = max( temp1, abs( wa2( j ) ),
907 $ abs( eveigs( j ) ) )
908 temp2 = max( temp2, abs( wa2( j )-eveigs( j ) ) )
910 result( 6 ) = temp2 / max( unfl,
911 $ ulp*max( temp1, temp2 ) )
917 d1( i ) = dble( a( i, i ) )
920 d2( i ) = dble( a( i+1, i ) )
923 CALL dstevr(
'V',
'A', n, d1, d2, vl, vu, il, iu, abstol,
924 $ m, wa1, z, ldu, iwork, work, lwork,
925 $ iwork(2*n+1), liwork-2*n, iinfo )
926 IF( iinfo.NE.0 )
THEN
927 WRITE( nounit, fmt = 9999 )
'DSTEVR(V,A)', iinfo, n,
930 IF( iinfo.LT.0 )
THEN
939 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
947 d3( i ) = dble( a( i, i ) )
950 d4( i ) = dble( a( i+1, i ) )
952 CALL dstt21( n, 0, d3, d4, wa1, d2, z, ldu, work,
957 d4( i ) = dble( a( i+1, i ) )
960 CALL dstevr(
'N',
'A', n, d3, d4, vl, vu, il, iu, abstol,
961 $ m2, wa2, z, ldu, iwork, work, lwork,
962 $ iwork(2*n+1), liwork-2*n, iinfo )
963 IF( iinfo.NE.0 )
THEN
964 WRITE( nounit, fmt = 9999 )
'DSTEVR(N,A)', iinfo, n,
967 IF( iinfo.LT.0 )
THEN
980 temp1 = max( temp1, abs( wa2( j ) ),
981 $ abs( eveigs( j ) ) )
982 temp2 = max( temp2, abs( wa2( j )-eveigs( j ) ) )
984 result( 9 ) = temp2 / max( unfl,
985 $ ulp*max( temp1, temp2 ) )
992 d1( i ) = dble( a( i, i ) )
995 d2( i ) = dble( a( i+1, i ) )
998 CALL dstevx(
'V',
'I', n, d1, d2, vl, vu, il, iu, abstol,
999 $ m2, wa2, z, ldu, work, iwork,
1000 $ iwork( 5*n+1 ), iinfo )
1001 IF( iinfo.NE.0 )
THEN
1002 WRITE( nounit, fmt = 9999 )
'DSTEVX(V,I)', iinfo, n,
1005 IF( iinfo.LT.0 )
THEN
1008 result( 10 ) = ulpinv
1009 result( 11 ) = ulpinv
1010 result( 12 ) = ulpinv
1018 d3( i ) = dble( a( i, i ) )
1021 d4( i ) = dble( a( i+1, i ) )
1023 CALL dstt22( n, m2, 0, d3, d4, wa2, d2, z, ldu, work,
1024 $ max( 1, m2 ), result( 10 ) )
1029 d4( i ) = dble( a( i+1, i ) )
1032 CALL dstevx(
'N',
'I', n, d3, d4, vl, vu, il, iu, abstol,
1033 $ m3, wa3, z, ldu, work, iwork,
1034 $ iwork( 5*n+1 ), iinfo )
1035 IF( iinfo.NE.0 )
THEN
1036 WRITE( nounit, fmt = 9999 )
'DSTEVX(N,I)', iinfo, n,
1039 IF( iinfo.LT.0 )
THEN
1042 result( 12 ) = ulpinv
1049 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1050 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1051 result( 12 ) = ( temp1+temp2 ) / max( unfl, ulp*temp3 )
1058 vl = wa1( il ) - max( half*
1059 $ ( wa1( il )-wa1( il-1 ) ), ten*ulp*temp3,
1062 vl = wa1( 1 ) - max( half*( wa1( n )-wa1( 1 ) ),
1063 $ ten*ulp*temp3, ten*rtunfl )
1066 vu = wa1( iu ) + max( half*
1067 $ ( wa1( iu+1 )-wa1( iu ) ), ten*ulp*temp3,
1070 vu = wa1( n ) + max( half*( wa1( n )-wa1( 1 ) ),
1071 $ ten*ulp*temp3, ten*rtunfl )
1079 d1( i ) = dble( a( i, i ) )
1082 d2( i ) = dble( a( i+1, i ) )
1085 CALL dstevx(
'V',
'V', n, d1, d2, vl, vu, il, iu, abstol,
1086 $ m2, wa2, z, ldu, work, iwork,
1087 $ iwork( 5*n+1 ), iinfo )
1088 IF( iinfo.NE.0 )
THEN
1089 WRITE( nounit, fmt = 9999 )
'DSTEVX(V,V)', iinfo, n,
1092 IF( iinfo.LT.0 )
THEN
1095 result( 13 ) = ulpinv
1096 result( 14 ) = ulpinv
1097 result( 15 ) = ulpinv
1102 IF( m2.EQ.0 .AND. n.GT.0 )
THEN
1103 result( 13 ) = ulpinv
1104 result( 14 ) = ulpinv
1105 result( 15 ) = ulpinv
1112 d3( i ) = dble( a( i, i ) )
1115 d4( i ) = dble( a( i+1, i ) )
1117 CALL dstt22( n, m2, 0, d3, d4, wa2, d2, z, ldu, work,
1118 $ max( 1, m2 ), result( 13 ) )
1122 d4( i ) = dble( a( i+1, i ) )
1125 CALL dstevx(
'N',
'V', n, d3, d4, vl, vu, il, iu, abstol,
1126 $ m3, wa3, z, ldu, work, iwork,
1127 $ iwork( 5*n+1 ), iinfo )
1128 IF( iinfo.NE.0 )
THEN
1129 WRITE( nounit, fmt = 9999 )
'DSTEVX(N,V)', iinfo, n,
1132 IF( iinfo.LT.0 )
THEN
1135 result( 15 ) = ulpinv
1142 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1143 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1144 result( 15 ) = ( temp1+temp2 ) / max( unfl, temp3*ulp )
1150 d1( i ) = dble( a( i, i ) )
1153 d2( i ) = dble( a( i+1, i ) )
1156 CALL dstevd(
'V', n, d1, d2, z, ldu, work, lwedc, iwork,
1158 IF( iinfo.NE.0 )
THEN
1159 WRITE( nounit, fmt = 9999 )
'DSTEVD(V)', iinfo, n,
1162 IF( iinfo.LT.0 )
THEN
1165 result( 16 ) = ulpinv
1166 result( 17 ) = ulpinv
1167 result( 18 ) = ulpinv
1175 d3( i ) = dble( a( i, i ) )
1178 d4( i ) = dble( a( i+1, i ) )
1180 CALL dstt21( n, 0, d3, d4, d1, d2, z, ldu, work,
1185 d4( i ) = dble( a( i+1, i ) )
1188 CALL dstevd(
'N', n, d3, d4, z, ldu, work, lwedc, iwork,
1190 IF( iinfo.NE.0 )
THEN
1191 WRITE( nounit, fmt = 9999 )
'DSTEVD(N)', iinfo, n,
1194 IF( iinfo.LT.0 )
THEN
1197 result( 18 ) = ulpinv
1207 temp1 = max( temp1, abs( eveigs( j ) ),
1209 temp2 = max( temp2, abs( eveigs( j )-d3( j ) ) )
1211 result( 18 ) = temp2 / max( unfl,
1212 $ ulp*max( temp1, temp2 ) )
1218 d1( i ) = dble( a( i, i ) )
1221 d2( i ) = dble( a( i+1, i ) )
1224 CALL dstevr(
'V',
'I', n, d1, d2, vl, vu, il, iu, abstol,
1225 $ m2, wa2, z, ldu, iwork, work, lwork,
1226 $ iwork(2*n+1), liwork-2*n, iinfo )
1227 IF( iinfo.NE.0 )
THEN
1228 WRITE( nounit, fmt = 9999 )
'DSTEVR(V,I)', iinfo, n,
1231 IF( iinfo.LT.0 )
THEN
1234 result( 19 ) = ulpinv
1235 result( 20 ) = ulpinv
1236 result( 21 ) = ulpinv
1244 d3( i ) = dble( a( i, i ) )
1247 d4( i ) = dble( a( i+1, i ) )
1249 CALL dstt22( n, m2, 0, d3, d4, wa2, d2, z, ldu, work,
1250 $ max( 1, m2 ), result( 19 ) )
1255 d4( i ) = dble( a( i+1, i ) )
1258 CALL dstevr(
'N',
'I', n, d3, d4, vl, vu, il, iu, abstol,
1259 $ m3, wa3, z, ldu, iwork, work, lwork,
1260 $ iwork(2*n+1), liwork-2*n, iinfo )
1261 IF( iinfo.NE.0 )
THEN
1262 WRITE( nounit, fmt = 9999 )
'DSTEVR(N,I)', iinfo, n,
1265 IF( iinfo.LT.0 )
THEN
1268 result( 21 ) = ulpinv
1275 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1276 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1277 result( 21 ) = ( temp1+temp2 ) / max( unfl, ulp*temp3 )
1284 vl = wa1( il ) - max( half*
1285 $ ( wa1( il )-wa1( il-1 ) ), ten*ulp*temp3,
1288 vl = wa1( 1 ) - max( half*( wa1( n )-wa1( 1 ) ),
1289 $ ten*ulp*temp3, ten*rtunfl )
1292 vu = wa1( iu ) + max( half*
1293 $ ( wa1( iu+1 )-wa1( iu ) ), ten*ulp*temp3,
1296 vu = wa1( n ) + max( half*( wa1( n )-wa1( 1 ) ),
1297 $ ten*ulp*temp3, ten*rtunfl )
1305 d1( i ) = dble( a( i, i ) )
1308 d2( i ) = dble( a( i+1, i ) )
1311 CALL dstevr(
'V',
'V', n, d1, d2, vl, vu, il, iu, abstol,
1312 $ m2, wa2, z, ldu, iwork, work, lwork,
1313 $ iwork(2*n+1), liwork-2*n, iinfo )
1314 IF( iinfo.NE.0 )
THEN
1315 WRITE( nounit, fmt = 9999 )
'DSTEVR(V,V)', iinfo, n,
1318 IF( iinfo.LT.0 )
THEN
1321 result( 22 ) = ulpinv
1322 result( 23 ) = ulpinv
1323 result( 24 ) = ulpinv
1328 IF( m2.EQ.0 .AND. n.GT.0 )
THEN
1329 result( 22 ) = ulpinv
1330 result( 23 ) = ulpinv
1331 result( 24 ) = ulpinv
1338 d3( i ) = dble( a( i, i ) )
1341 d4( i ) = dble( a( i+1, i ) )
1343 CALL dstt22( n, m2, 0, d3, d4, wa2, d2, z, ldu, work,
1344 $ max( 1, m2 ), result( 22 ) )
1348 d4( i ) = dble( a( i+1, i ) )
1351 CALL dstevr(
'N',
'V', n, d3, d4, vl, vu, il, iu, abstol,
1352 $ m3, wa3, z, ldu, iwork, work, lwork,
1353 $ iwork(2*n+1), liwork-2*n, iinfo )
1354 IF( iinfo.NE.0 )
THEN
1355 WRITE( nounit, fmt = 9999 )
'DSTEVR(N,V)', iinfo, n,
1358 IF( iinfo.LT.0 )
THEN
1361 result( 24 ) = ulpinv
1368 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1369 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1370 result( 24 ) = ( temp1+temp2 ) / max( unfl, temp3*ulp )
1387 DO 1720 iuplo = 0, 1
1388 IF( iuplo.EQ.0 )
THEN
1396 CALL dlacpy(
' ', n, n, a, lda, v, ldu )
1400 CALL dsyev(
'V', uplo, n, a, ldu, d1, work, lwork,
1402 IF( iinfo.NE.0 )
THEN
1403 WRITE( nounit, fmt = 9999 )
'DSYEV(V,' // uplo //
')',
1404 $ iinfo, n, jtype, ioldsd
1406 IF( iinfo.LT.0 )
THEN
1409 result( ntest ) = ulpinv
1410 result( ntest+1 ) = ulpinv
1411 result( ntest+2 ) = ulpinv
1418 CALL dsyt21( 1, uplo, n, 0, v, ldu, d1, d2, a, ldu, z,
1419 $ ldu, tau, work, result( ntest ) )
1421 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1425 CALL dsyev(
'N', uplo, n, a, ldu, d3, work, lwork,
1427 IF( iinfo.NE.0 )
THEN
1428 WRITE( nounit, fmt = 9999 )
'DSYEV(N,' // uplo //
')',
1429 $ iinfo, n, jtype, ioldsd
1431 IF( iinfo.LT.0 )
THEN
1434 result( ntest ) = ulpinv
1444 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
1445 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
1447 result( ntest ) = temp2 / max( unfl,
1448 $ ulp*max( temp1, temp2 ) )
1451 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1456 temp3 = max( abs( d1( 1 ) ), abs( d1( n ) ) )
1458 vl = d1( il ) - max( half*( d1( il )-d1( il-1 ) ),
1459 $ ten*ulp*temp3, ten*rtunfl )
1460 ELSE IF( n.GT.0 )
THEN
1461 vl = d1( 1 ) - max( half*( d1( n )-d1( 1 ) ),
1462 $ ten*ulp*temp3, ten*rtunfl )
1465 vu = d1( iu ) + max( half*( d1( iu+1 )-d1( iu ) ),
1466 $ ten*ulp*temp3, ten*rtunfl )
1467 ELSE IF( n.GT.0 )
THEN
1468 vu = d1( n ) + max( half*( d1( n )-d1( 1 ) ),
1469 $ ten*ulp*temp3, ten*rtunfl )
1478 CALL dsyevx(
'V',
'A', uplo, n, a, ldu, vl, vu, il, iu,
1479 $ abstol, m, wa1, z, ldu, work, lwork, iwork,
1480 $ iwork( 5*n+1 ), iinfo )
1481 IF( iinfo.NE.0 )
THEN
1482 WRITE( nounit, fmt = 9999 )
'DSYEVX(V,A,' // uplo //
1483 $
')', iinfo, n, jtype, ioldsd
1485 IF( iinfo.LT.0 )
THEN
1488 result( ntest ) = ulpinv
1489 result( ntest+1 ) = ulpinv
1490 result( ntest+2 ) = ulpinv
1497 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1499 CALL dsyt21( 1, uplo, n, 0, a, ldu, d1, d2, z, ldu, v,
1500 $ ldu, tau, work, result( ntest ) )
1504 CALL dsyevx(
'N',
'A', uplo, n, a, ldu, vl, vu, il, iu,
1505 $ abstol, m2, wa2, z, ldu, work, lwork, iwork,
1506 $ iwork( 5*n+1 ), iinfo )
1507 IF( iinfo.NE.0 )
THEN
1508 WRITE( nounit, fmt = 9999 )
'DSYEVX(N,A,' // uplo //
1509 $
')', iinfo, n, jtype, ioldsd
1511 IF( iinfo.LT.0 )
THEN
1514 result( ntest ) = ulpinv
1524 temp1 = max( temp1, abs( wa1( j ) ), abs( wa2( j ) ) )
1525 temp2 = max( temp2, abs( wa1( j )-wa2( j ) ) )
1527 result( ntest ) = temp2 / max( unfl,
1528 $ ulp*max( temp1, temp2 ) )
1533 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1535 CALL dsyevx(
'V',
'I', uplo, n, a, ldu, vl, vu, il, iu,
1536 $ abstol, m2, wa2, z, ldu, work, lwork, iwork,
1537 $ iwork( 5*n+1 ), iinfo )
1538 IF( iinfo.NE.0 )
THEN
1539 WRITE( nounit, fmt = 9999 )
'DSYEVX(V,I,' // uplo //
1540 $
')', iinfo, n, jtype, ioldsd
1542 IF( iinfo.LT.0 )
THEN
1545 result( ntest ) = ulpinv
1546 result( ntest+1 ) = ulpinv
1547 result( ntest+2 ) = ulpinv
1554 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1556 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
1557 $ v, ldu, tau, work, result( ntest ) )
1560 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1562 CALL dsyevx(
'N',
'I', uplo, n, a, ldu, vl, vu, il, iu,
1563 $ abstol, m3, wa3, z, ldu, work, lwork, iwork,
1564 $ iwork( 5*n+1 ), iinfo )
1565 IF( iinfo.NE.0 )
THEN
1566 WRITE( nounit, fmt = 9999 )
'DSYEVX(N,I,' // uplo //
1567 $
')', iinfo, n, jtype, ioldsd
1569 IF( iinfo.LT.0 )
THEN
1572 result( ntest ) = ulpinv
1579 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1580 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1581 result( ntest ) = ( temp1+temp2 ) /
1582 $ max( unfl, ulp*temp3 )
1586 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1588 CALL dsyevx(
'V',
'V', uplo, n, a, ldu, vl, vu, il, iu,
1589 $ abstol, m2, wa2, z, ldu, work, lwork, iwork,
1590 $ iwork( 5*n+1 ), iinfo )
1591 IF( iinfo.NE.0 )
THEN
1592 WRITE( nounit, fmt = 9999 )
'DSYEVX(V,V,' // uplo //
1593 $
')', iinfo, n, jtype, ioldsd
1595 IF( iinfo.LT.0 )
THEN
1598 result( ntest ) = ulpinv
1599 result( ntest+1 ) = ulpinv
1600 result( ntest+2 ) = ulpinv
1607 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1609 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
1610 $ v, ldu, tau, work, result( ntest ) )
1613 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1615 CALL dsyevx(
'N',
'V', uplo, n, a, ldu, vl, vu, il, iu,
1616 $ abstol, m3, wa3, z, ldu, work, lwork, iwork,
1617 $ iwork( 5*n+1 ), iinfo )
1618 IF( iinfo.NE.0 )
THEN
1619 WRITE( nounit, fmt = 9999 )
'DSYEVX(N,V,' // uplo //
1620 $
')', iinfo, n, jtype, ioldsd
1622 IF( iinfo.LT.0 )
THEN
1625 result( ntest ) = ulpinv
1630 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
1631 result( ntest ) = ulpinv
1637 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1638 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1640 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
1644 result( ntest ) = ( temp1+temp2 ) /
1645 $ max( unfl, temp3*ulp )
1651 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1656 IF( iuplo.EQ.1 )
THEN
1660 work( indx ) = a( i, j )
1668 work( indx ) = a( i, j )
1676 CALL dspev(
'V', uplo, n, work, d1, z, ldu, v, iinfo )
1677 IF( iinfo.NE.0 )
THEN
1678 WRITE( nounit, fmt = 9999 )
'DSPEV(V,' // uplo //
')',
1679 $ iinfo, n, jtype, ioldsd
1681 IF( iinfo.LT.0 )
THEN
1684 result( ntest ) = ulpinv
1685 result( ntest+1 ) = ulpinv
1686 result( ntest+2 ) = ulpinv
1693 CALL dsyt21( 1, uplo, n, 0, a, lda, d1, d2, z, ldu, v,
1694 $ ldu, tau, work, result( ntest ) )
1696 IF( iuplo.EQ.1 )
THEN
1700 work( indx ) = a( i, j )
1708 work( indx ) = a( i, j )
1716 CALL dspev(
'N', uplo, n, work, d3, z, ldu, v, iinfo )
1717 IF( iinfo.NE.0 )
THEN
1718 WRITE( nounit, fmt = 9999 )
'DSPEV(N,' // uplo //
')',
1719 $ iinfo, n, jtype, ioldsd
1721 IF( iinfo.LT.0 )
THEN
1724 result( ntest ) = ulpinv
1734 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
1735 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
1737 result( ntest ) = temp2 / max( unfl,
1738 $ ulp*max( temp1, temp2 ) )
1744 IF( iuplo.EQ.1 )
THEN
1748 work( indx ) = a( i, j )
1756 work( indx ) = a( i, j )
1765 temp3 = max( abs( d1( 1 ) ), abs( d1( n ) ) )
1767 vl = d1( il ) - max( half*( d1( il )-d1( il-1 ) ),
1768 $ ten*ulp*temp3, ten*rtunfl )
1769 ELSE IF( n.GT.0 )
THEN
1770 vl = d1( 1 ) - max( half*( d1( n )-d1( 1 ) ),
1771 $ ten*ulp*temp3, ten*rtunfl )
1774 vu = d1( iu ) + max( half*( d1( iu+1 )-d1( iu ) ),
1775 $ ten*ulp*temp3, ten*rtunfl )
1776 ELSE IF( n.GT.0 )
THEN
1777 vu = d1( n ) + max( half*( d1( n )-d1( 1 ) ),
1778 $ ten*ulp*temp3, ten*rtunfl )
1787 CALL dspevx(
'V',
'A', uplo, n, work, vl, vu, il, iu,
1788 $ abstol, m, wa1, z, ldu, v, iwork,
1789 $ iwork( 5*n+1 ), iinfo )
1790 IF( iinfo.NE.0 )
THEN
1791 WRITE( nounit, fmt = 9999 )
'DSPEVX(V,A,' // uplo //
1792 $
')', iinfo, n, jtype, ioldsd
1794 IF( iinfo.LT.0 )
THEN
1797 result( ntest ) = ulpinv
1798 result( ntest+1 ) = ulpinv
1799 result( ntest+2 ) = ulpinv
1806 CALL dsyt21( 1, uplo, n, 0, a, ldu, wa1, d2, z, ldu, v,
1807 $ ldu, tau, work, result( ntest ) )
1811 IF( iuplo.EQ.1 )
THEN
1815 work( indx ) = a( i, j )
1823 work( indx ) = a( i, j )
1830 CALL dspevx(
'N',
'A', uplo, n, work, vl, vu, il, iu,
1831 $ abstol, m2, wa2, z, ldu, v, iwork,
1832 $ iwork( 5*n+1 ), iinfo )
1833 IF( iinfo.NE.0 )
THEN
1834 WRITE( nounit, fmt = 9999 )
'DSPEVX(N,A,' // uplo //
1835 $
')', iinfo, n, jtype, ioldsd
1837 IF( iinfo.LT.0 )
THEN
1840 result( ntest ) = ulpinv
1850 temp1 = max( temp1, abs( wa1( j ) ), abs( wa2( j ) ) )
1851 temp2 = max( temp2, abs( wa1( j )-wa2( j ) ) )
1853 result( ntest ) = temp2 / max( unfl,
1854 $ ulp*max( temp1, temp2 ) )
1857 IF( iuplo.EQ.1 )
THEN
1861 work( indx ) = a( i, j )
1869 work( indx ) = a( i, j )
1878 CALL dspevx(
'V',
'I', uplo, n, work, vl, vu, il, iu,
1879 $ abstol, m2, wa2, z, ldu, v, iwork,
1880 $ iwork( 5*n+1 ), iinfo )
1881 IF( iinfo.NE.0 )
THEN
1882 WRITE( nounit, fmt = 9999 )
'DSPEVX(V,I,' // uplo //
1883 $
')', iinfo, n, jtype, ioldsd
1885 IF( iinfo.LT.0 )
THEN
1888 result( ntest ) = ulpinv
1889 result( ntest+1 ) = ulpinv
1890 result( ntest+2 ) = ulpinv
1897 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
1898 $ v, ldu, tau, work, result( ntest ) )
1902 IF( iuplo.EQ.1 )
THEN
1906 work( indx ) = a( i, j )
1914 work( indx ) = a( i, j )
1921 CALL dspevx(
'N',
'I', uplo, n, work, vl, vu, il, iu,
1922 $ abstol, m3, wa3, z, ldu, v, iwork,
1923 $ iwork( 5*n+1 ), iinfo )
1924 IF( iinfo.NE.0 )
THEN
1925 WRITE( nounit, fmt = 9999 )
'DSPEVX(N,I,' // uplo //
1926 $
')', iinfo, n, jtype, ioldsd
1928 IF( iinfo.LT.0 )
THEN
1931 result( ntest ) = ulpinv
1936 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
1937 result( ntest ) = ulpinv
1943 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1944 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1946 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
1950 result( ntest ) = ( temp1+temp2 ) /
1951 $ max( unfl, temp3*ulp )
1954 IF( iuplo.EQ.1 )
THEN
1958 work( indx ) = a( i, j )
1966 work( indx ) = a( i, j )
1975 CALL dspevx(
'V',
'V', uplo, n, work, vl, vu, il, iu,
1976 $ abstol, m2, wa2, z, ldu, v, iwork,
1977 $ iwork( 5*n+1 ), iinfo )
1978 IF( iinfo.NE.0 )
THEN
1979 WRITE( nounit, fmt = 9999 )
'DSPEVX(V,V,' // uplo //
1980 $
')', iinfo, n, jtype, ioldsd
1982 IF( iinfo.LT.0 )
THEN
1985 result( ntest ) = ulpinv
1986 result( ntest+1 ) = ulpinv
1987 result( ntest+2 ) = ulpinv
1994 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
1995 $ v, ldu, tau, work, result( ntest ) )
1999 IF( iuplo.EQ.1 )
THEN
2003 work( indx ) = a( i, j )
2011 work( indx ) = a( i, j )
2018 CALL dspevx(
'N',
'V', uplo, n, work, vl, vu, il, iu,
2019 $ abstol, m3, wa3, z, ldu, v, iwork,
2020 $ iwork( 5*n+1 ), iinfo )
2021 IF( iinfo.NE.0 )
THEN
2022 WRITE( nounit, fmt = 9999 )
'DSPEVX(N,V,' // uplo //
2023 $
')', iinfo, n, jtype, ioldsd
2025 IF( iinfo.LT.0 )
THEN
2028 result( ntest ) = ulpinv
2033 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
2034 result( ntest ) = ulpinv
2040 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
2041 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
2043 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
2047 result( ntest ) = ( temp1+temp2 ) /
2048 $ max( unfl, temp3*ulp )
2054 IF( jtype.LE.7 )
THEN
2056 ELSE IF( jtype.GE.8 .AND. jtype.LE.15 )
THEN
2065 IF( iuplo.EQ.1 )
THEN
2067 DO 1090 i = max( 1, j-kd ), j
2068 v( kd+1+i-j, j ) = a( i, j )
2073 DO 1110 i = j, min( n, j+kd )
2074 v( 1+i-j, j ) = a( i, j )
2081 CALL dsbev(
'V', uplo, n, kd, v, ldu, d1, z, ldu, work,
2083 IF( iinfo.NE.0 )
THEN
2084 WRITE( nounit, fmt = 9999 )
'DSBEV(V,' // uplo //
')',
2085 $ iinfo, n, jtype, ioldsd
2087 IF( iinfo.LT.0 )
THEN
2090 result( ntest ) = ulpinv
2091 result( ntest+1 ) = ulpinv
2092 result( ntest+2 ) = ulpinv
2099 CALL dsyt21( 1, uplo, n, 0, a, lda, d1, d2, z, ldu, v,
2100 $ ldu, tau, work, result( ntest ) )
2102 IF( iuplo.EQ.1 )
THEN
2104 DO 1130 i = max( 1, j-kd ), j
2105 v( kd+1+i-j, j ) = a( i, j )
2110 DO 1150 i = j, min( n, j+kd )
2111 v( 1+i-j, j ) = a( i, j )
2118 CALL dsbev(
'N', uplo, n, kd, v, ldu, d3, z, ldu, work,
2120 IF( iinfo.NE.0 )
THEN
2121 WRITE( nounit, fmt = 9999 )
'DSBEV(N,' // uplo //
')',
2122 $ iinfo, n, jtype, ioldsd
2124 IF( iinfo.LT.0 )
THEN
2127 result( ntest ) = ulpinv
2137 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
2138 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
2140 result( ntest ) = temp2 / max( unfl,
2141 $ ulp*max( temp1, temp2 ) )
2147 IF( iuplo.EQ.1 )
THEN
2149 DO 1190 i = max( 1, j-kd ), j
2150 v( kd+1+i-j, j ) = a( i, j )
2155 DO 1210 i = j, min( n, j+kd )
2156 v( 1+i-j, j ) = a( i, j )
2163 CALL dsbevx(
'V',
'A', uplo, n, kd, v, ldu, u, ldu, vl,
2164 $ vu, il, iu, abstol, m, wa2, z, ldu, work,
2165 $ iwork, iwork( 5*n+1 ), iinfo )
2166 IF( iinfo.NE.0 )
THEN
2167 WRITE( nounit, fmt = 9999 )
'DSBEVX(V,A,' // uplo //
2168 $
')', iinfo, n, jtype, ioldsd
2170 IF( iinfo.LT.0 )
THEN
2173 result( ntest ) = ulpinv
2174 result( ntest+1 ) = ulpinv
2175 result( ntest+2 ) = ulpinv
2182 CALL dsyt21( 1, uplo, n, 0, a, ldu, wa2, d2, z, ldu, v,
2183 $ ldu, tau, work, result( ntest ) )
2187 IF( iuplo.EQ.1 )
THEN
2189 DO 1230 i = max( 1, j-kd ), j
2190 v( kd+1+i-j, j ) = a( i, j )
2195 DO 1250 i = j, min( n, j+kd )
2196 v( 1+i-j, j ) = a( i, j )
2202 CALL dsbevx(
'N',
'A', uplo, n, kd, v, ldu, u, ldu, vl,
2203 $ vu, il, iu, abstol, m3, wa3, z, ldu, work,
2204 $ iwork, iwork( 5*n+1 ), iinfo )
2205 IF( iinfo.NE.0 )
THEN
2206 WRITE( nounit, fmt = 9999 )
'DSBEVX(N,A,' // uplo //
2207 $
')', iinfo, n, jtype, ioldsd
2209 IF( iinfo.LT.0 )
THEN
2212 result( ntest ) = ulpinv
2222 temp1 = max( temp1, abs( wa2( j ) ), abs( wa3( j ) ) )
2223 temp2 = max( temp2, abs( wa2( j )-wa3( j ) ) )
2225 result( ntest ) = temp2 / max( unfl,
2226 $ ulp*max( temp1, temp2 ) )
2230 IF( iuplo.EQ.1 )
THEN
2232 DO 1290 i = max( 1, j-kd ), j
2233 v( kd+1+i-j, j ) = a( i, j )
2238 DO 1310 i = j, min( n, j+kd )
2239 v( 1+i-j, j ) = a( i, j )
2245 CALL dsbevx(
'V',
'I', uplo, n, kd, v, ldu, u, ldu, vl,
2246 $ vu, il, iu, abstol, m2, wa2, z, ldu, work,
2247 $ iwork, iwork( 5*n+1 ), iinfo )
2248 IF( iinfo.NE.0 )
THEN
2249 WRITE( nounit, fmt = 9999 )
'DSBEVX(V,I,' // uplo //
2250 $
')', iinfo, n, jtype, ioldsd
2252 IF( iinfo.LT.0 )
THEN
2255 result( ntest ) = ulpinv
2256 result( ntest+1 ) = ulpinv
2257 result( ntest+2 ) = ulpinv
2264 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
2265 $ v, ldu, tau, work, result( ntest ) )
2269 IF( iuplo.EQ.1 )
THEN
2271 DO 1330 i = max( 1, j-kd ), j
2272 v( kd+1+i-j, j ) = a( i, j )
2277 DO 1350 i = j, min( n, j+kd )
2278 v( 1+i-j, j ) = a( i, j )
2284 CALL dsbevx(
'N',
'I', uplo, n, kd, v, ldu, u, ldu, vl,
2285 $ vu, il, iu, abstol, m3, wa3, z, ldu, work,
2286 $ iwork, iwork( 5*n+1 ), iinfo )
2287 IF( iinfo.NE.0 )
THEN
2288 WRITE( nounit, fmt = 9999 )
'DSBEVX(N,I,' // uplo //
2289 $
')', iinfo, n, jtype, ioldsd
2291 IF( iinfo.LT.0 )
THEN
2294 result( ntest ) = ulpinv
2301 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
2302 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
2304 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
2308 result( ntest ) = ( temp1+temp2 ) /
2309 $ max( unfl, temp3*ulp )
2313 IF( iuplo.EQ.1 )
THEN
2315 DO 1380 i = max( 1, j-kd ), j
2316 v( kd+1+i-j, j ) = a( i, j )
2321 DO 1400 i = j, min( n, j+kd )
2322 v( 1+i-j, j ) = a( i, j )
2328 CALL dsbevx(
'V',
'V', uplo, n, kd, v, ldu, u, ldu, vl,
2329 $ vu, il, iu, abstol, m2, wa2, z, ldu, work,
2330 $ iwork, iwork( 5*n+1 ), iinfo )
2331 IF( iinfo.NE.0 )
THEN
2332 WRITE( nounit, fmt = 9999 )
'DSBEVX(V,V,' // uplo //
2333 $
')', iinfo, n, jtype, ioldsd
2335 IF( iinfo.LT.0 )
THEN
2338 result( ntest ) = ulpinv
2339 result( ntest+1 ) = ulpinv
2340 result( ntest+2 ) = ulpinv
2347 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
2348 $ v, ldu, tau, work, result( ntest ) )
2352 IF( iuplo.EQ.1 )
THEN
2354 DO 1420 i = max( 1, j-kd ), j
2355 v( kd+1+i-j, j ) = a( i, j )
2360 DO 1440 i = j, min( n, j+kd )
2361 v( 1+i-j, j ) = a( i, j )
2367 CALL dsbevx(
'N',
'V', uplo, n, kd, v, ldu, u, ldu, vl,
2368 $ vu, il, iu, abstol, m3, wa3, z, ldu, work,
2369 $ iwork, iwork( 5*n+1 ), iinfo )
2370 IF( iinfo.NE.0 )
THEN
2371 WRITE( nounit, fmt = 9999 )
'DSBEVX(N,V,' // uplo //
2372 $
')', iinfo, n, jtype, ioldsd
2374 IF( iinfo.LT.0 )
THEN
2377 result( ntest ) = ulpinv
2382 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
2383 result( ntest ) = ulpinv
2389 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
2390 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
2392 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
2396 result( ntest ) = ( temp1+temp2 ) /
2397 $ max( unfl, temp3*ulp )
2403 CALL dlacpy(
' ', n, n, a, lda, v, ldu )
2407 CALL dsyevd(
'V', uplo, n, a, ldu, d1, work, lwedc,
2408 $ iwork, liwedc, iinfo )
2409 IF( iinfo.NE.0 )
THEN
2410 WRITE( nounit, fmt = 9999 )
'DSYEVD(V,' // uplo //
2411 $
')', iinfo, n, jtype, ioldsd
2413 IF( iinfo.LT.0 )
THEN
2416 result( ntest ) = ulpinv
2417 result( ntest+1 ) = ulpinv
2418 result( ntest+2 ) = ulpinv
2425 CALL dsyt21( 1, uplo, n, 0, v, ldu, d1, d2, a, ldu, z,
2426 $ ldu, tau, work, result( ntest ) )
2428 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2432 CALL dsyevd(
'N', uplo, n, a, ldu, d3, work, lwedc,
2433 $ iwork, liwedc, iinfo )
2434 IF( iinfo.NE.0 )
THEN
2435 WRITE( nounit, fmt = 9999 )
'DSYEVD(N,' // uplo //
2436 $
')', iinfo, n, jtype, ioldsd
2438 IF( iinfo.LT.0 )
THEN
2441 result( ntest ) = ulpinv
2451 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
2452 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
2454 result( ntest ) = temp2 / max( unfl,
2455 $ ulp*max( temp1, temp2 ) )
2461 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2466 IF( iuplo.EQ.1 )
THEN
2470 work( indx ) = a( i, j )
2478 work( indx ) = a( i, j )
2486 CALL dspevd(
'V', uplo, n, work, d1, z, ldu,
2487 $ work( indx ), lwedc-indx+1, iwork, liwedc,
2489 IF( iinfo.NE.0 )
THEN
2490 WRITE( nounit, fmt = 9999 )
'DSPEVD(V,' // uplo //
2491 $
')', iinfo, n, jtype, ioldsd
2493 IF( iinfo.LT.0 )
THEN
2496 result( ntest ) = ulpinv
2497 result( ntest+1 ) = ulpinv
2498 result( ntest+2 ) = ulpinv
2505 CALL dsyt21( 1, uplo, n, 0, a, lda, d1, d2, z, ldu, v,
2506 $ ldu, tau, work, result( ntest ) )
2508 IF( iuplo.EQ.1 )
THEN
2513 work( indx ) = a( i, j )
2521 work( indx ) = a( i, j )
2529 CALL dspevd(
'N', uplo, n, work, d3, z, ldu,
2530 $ work( indx ), lwedc-indx+1, iwork, liwedc,
2532 IF( iinfo.NE.0 )
THEN
2533 WRITE( nounit, fmt = 9999 )
'DSPEVD(N,' // uplo //
2534 $
')', iinfo, n, jtype, ioldsd
2536 IF( iinfo.LT.0 )
THEN
2539 result( ntest ) = ulpinv
2549 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
2550 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
2552 result( ntest ) = temp2 / max( unfl,
2553 $ ulp*max( temp1, temp2 ) )
2558 IF( jtype.LE.7 )
THEN
2560 ELSE IF( jtype.GE.8 .AND. jtype.LE.15 )
THEN
2569 IF( iuplo.EQ.1 )
THEN
2571 DO 1590 i = max( 1, j-kd ), j
2572 v( kd+1+i-j, j ) = a( i, j )
2577 DO 1610 i = j, min( n, j+kd )
2578 v( 1+i-j, j ) = a( i, j )
2585 CALL dsbevd(
'V', uplo, n, kd, v, ldu, d1, z, ldu, work,
2586 $ lwedc, iwork, liwedc, iinfo )
2587 IF( iinfo.NE.0 )
THEN
2588 WRITE( nounit, fmt = 9999 )
'DSBEVD(V,' // uplo //
2589 $
')', iinfo, n, jtype, ioldsd
2591 IF( iinfo.LT.0 )
THEN
2594 result( ntest ) = ulpinv
2595 result( ntest+1 ) = ulpinv
2596 result( ntest+2 ) = ulpinv
2603 CALL dsyt21( 1, uplo, n, 0, a, lda, d1, d2, z, ldu, v,
2604 $ ldu, tau, work, result( ntest ) )
2606 IF( iuplo.EQ.1 )
THEN
2608 DO 1630 i = max( 1, j-kd ), j
2609 v( kd+1+i-j, j ) = a( i, j )
2614 DO 1650 i = j, min( n, j+kd )
2615 v( 1+i-j, j ) = a( i, j )
2622 CALL dsbevd(
'N', uplo, n, kd, v, ldu, d3, z, ldu, work,
2623 $ lwedc, iwork, liwedc, iinfo )
2624 IF( iinfo.NE.0 )
THEN
2625 WRITE( nounit, fmt = 9999 )
'DSBEVD(N,' // uplo //
2626 $
')', iinfo, n, jtype, ioldsd
2628 IF( iinfo.LT.0 )
THEN
2631 result( ntest ) = ulpinv
2641 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
2642 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
2644 result( ntest ) = temp2 / max( unfl,
2645 $ ulp*max( temp1, temp2 ) )
2650 CALL dlacpy(
' ', n, n, a, lda, v, ldu )
2653 CALL dsyevr(
'V',
'A', uplo, n, a, ldu, vl, vu, il, iu,
2654 $ abstol, m, wa1, z, ldu, iwork, work, lwork,
2655 $ iwork(2*n+1), liwork-2*n, iinfo )
2656 IF( iinfo.NE.0 )
THEN
2657 WRITE( nounit, fmt = 9999 )
'DSYEVR(V,A,' // uplo //
2658 $
')', iinfo, n, jtype, ioldsd
2660 IF( iinfo.LT.0 )
THEN
2663 result( ntest ) = ulpinv
2664 result( ntest+1 ) = ulpinv
2665 result( ntest+2 ) = ulpinv
2672 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2674 CALL dsyt21( 1, uplo, n, 0, a, ldu, wa1, d2, z, ldu, v,
2675 $ ldu, tau, work, result( ntest ) )
2679 CALL dsyevr(
'N',
'A', uplo, n, a, ldu, vl, vu, il, iu,
2680 $ abstol, m2, wa2, z, ldu, iwork, work, lwork,
2681 $ iwork(2*n+1), liwork-2*n, iinfo )
2682 IF( iinfo.NE.0 )
THEN
2683 WRITE( nounit, fmt = 9999 )
'DSYEVR(N,A,' // uplo //
2684 $
')', iinfo, n, jtype, ioldsd
2686 IF( iinfo.LT.0 )
THEN
2689 result( ntest ) = ulpinv
2699 temp1 = max( temp1, abs( wa1( j ) ), abs( wa2( j ) ) )
2700 temp2 = max( temp2, abs( wa1( j )-wa2( j ) ) )
2702 result( ntest ) = temp2 / max( unfl,
2703 $ ulp*max( temp1, temp2 ) )
2708 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2710 CALL dsyevr(
'V',
'I', uplo, n, a, ldu, vl, vu, il, iu,
2711 $ abstol, m2, wa2, z, ldu, iwork, work, lwork,
2712 $ iwork(2*n+1), liwork-2*n, iinfo )
2713 IF( iinfo.NE.0 )
THEN
2714 WRITE( nounit, fmt = 9999 )
'DSYEVR(V,I,' // uplo //
2715 $
')', iinfo, n, jtype, ioldsd
2717 IF( iinfo.LT.0 )
THEN
2720 result( ntest ) = ulpinv
2721 result( ntest+1 ) = ulpinv
2722 result( ntest+2 ) = ulpinv
2729 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2731 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
2732 $ v, ldu, tau, work, result( ntest ) )
2735 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2737 CALL dsyevr(
'N',
'I', uplo, n, a, ldu, vl, vu, il, iu,
2738 $ abstol, m3, wa3, z, ldu, iwork, work, lwork,
2739 $ iwork(2*n+1), liwork-2*n, iinfo )
2740 IF( iinfo.NE.0 )
THEN
2741 WRITE( nounit, fmt = 9999 )
'DSYEVR(N,I,' // uplo //
2742 $
')', iinfo, n, jtype, ioldsd
2744 IF( iinfo.LT.0 )
THEN
2747 result( ntest ) = ulpinv
2754 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
2755 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
2756 result( ntest ) = ( temp1+temp2 ) /
2757 $ max( unfl, ulp*temp3 )
2761 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2763 CALL dsyevr(
'V',
'V', uplo, n, a, ldu, vl, vu, il, iu,
2764 $ abstol, m2, wa2, z, ldu, iwork, work, lwork,
2765 $ iwork(2*n+1), liwork-2*n, iinfo )
2766 IF( iinfo.NE.0 )
THEN
2767 WRITE( nounit, fmt = 9999 )
'DSYEVR(V,V,' // uplo //
2768 $
')', iinfo, n, jtype, ioldsd
2770 IF( iinfo.LT.0 )
THEN
2773 result( ntest ) = ulpinv
2774 result( ntest+1 ) = ulpinv
2775 result( ntest+2 ) = ulpinv
2782 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2784 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
2785 $ v, ldu, tau, work, result( ntest ) )
2788 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2790 CALL dsyevr(
'N',
'V', uplo, n, a, ldu, vl, vu, il, iu,
2791 $ abstol, m3, wa3, z, ldu, iwork, work, lwork,
2792 $ iwork(2*n+1), liwork-2*n, iinfo )
2793 IF( iinfo.NE.0 )
THEN
2794 WRITE( nounit, fmt = 9999 )
'DSYEVR(N,V,' // uplo //
2795 $
')', iinfo, n, jtype, ioldsd
2797 IF( iinfo.LT.0 )
THEN
2800 result( ntest ) = ulpinv
2805 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
2806 result( ntest ) = ulpinv
2812 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
2813 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
2815 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
2819 result( ntest ) = ( temp1+temp2 ) /
2820 $ max( unfl, temp3*ulp )
2822 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2828 ntestt = ntestt + ntest
2830 CALL dlafts(
'DST', n, n, jtype, ntest, result, ioldsd,
2831 $ thresh, nounit, nerrs )
2838 CALL alasvm(
'DST', nounit, nerrs, ntestt, 0 )
2840 9999
FORMAT(
' DDRVST: ', a,
' returned INFO=', i6,
'.', / 9x,
'N=',
2841 $ i6,
', JTYPE=', i6,
', ISEED=(', 3( i5,
',' ), i5,
')' )
subroutine dlabad(SMALL, LARGE)
DLABAD
subroutine dlacpy(UPLO, M, N, A, LDA, B, LDB)
DLACPY copies all or part of one two-dimensional array to another.
subroutine dlaset(UPLO, M, N, ALPHA, BETA, A, LDA)
DLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine alasvm(TYPE, NOUT, NFAIL, NRUN, NERRS)
ALASVM
subroutine ddrvst(NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH, NOUNIT, A, LDA, D1, D2, D3, D4, EVEIGS, WA1, WA2, WA3, U, LDU, V, TAU, Z, WORK, LWORK, IWORK, LIWORK, RESULT, INFO)
DDRVST
subroutine dlafts(TYPE, M, N, IMAT, NTESTS, RESULT, ISEED, THRESH, IOUNIT, IE)
DLAFTS
subroutine dsyt22(ITYPE, UPLO, N, M, KBAND, A, LDA, D, E, U, LDU, V, LDV, TAU, WORK, RESULT)
DSYT22
subroutine dstt22(N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK, LDWORK, RESULT)
DSTT22
subroutine dsyt21(ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V, LDV, TAU, WORK, RESULT)
DSYT21
subroutine dstt21(N, KBAND, AD, AE, SD, SE, U, LDU, WORK, RESULT)
DSTT21
subroutine dlatmr(M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX, RSIGN, GRADE, DL, MODEL, CONDL, DR, MODER, CONDR, PIVTNG, IPIVOT, KL, KU, SPARSE, ANORM, PACK, A, LDA, IWORK, INFO)
DLATMR
subroutine dlatms(M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX, KL, KU, PACK, A, LDA, WORK, INFO)
DLATMS
subroutine dspevx(JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO)
DSPEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dstevd(JOBZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO)
DSTEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dstevr(JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, LIWORK, INFO)
DSTEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dsbevx(JOBZ, RANGE, UPLO, N, KD, AB, LDAB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO)
DSBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dspevd(JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO)
DSPEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dstevx(JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO)
DSTEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dspev(JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, INFO)
DSPEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
subroutine dstev(JOBZ, N, D, E, Z, LDZ, WORK, INFO)
DSTEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
subroutine dsbev(JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK, INFO)
DSBEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
subroutine dsbevd(JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO)
DSBEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dsyev(JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO)
DSYEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices
subroutine dsyevx(JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK, IFAIL, INFO)
DSYEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices
subroutine dsyevd(JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, IWORK, LIWORK, INFO)
DSYEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices
subroutine dsyevr(JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, LIWORK, INFO)
DSYEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices