00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015
00016
00017
00018 static doublecomplex c_b1 = {0.,0.};
00019 static doublecomplex c_b2 = {1.,0.};
00020 static integer c__1 = 1;
00021 static integer c_n1 = -1;
00022 static integer c__2 = 2;
00023 static integer c__0 = 0;
00024 static integer c__6 = 6;
00025 static doublereal c_b39 = 1.;
00026 static doublereal c_b49 = 0.;
00027 static integer c__4 = 4;
00028 static integer c__3 = 3;
00029 static integer c__10 = 10;
00030 static integer c__11 = 11;
00031
00032 int zchkst_(integer *nsizes, integer *nn, integer *ntypes,
00033 logical *dotype, integer *iseed, doublereal *thresh, integer *nounit,
00034 doublecomplex *a, integer *lda, doublecomplex *ap, doublereal *sd,
00035 doublereal *se, doublereal *d1, doublereal *d2, doublereal *d3,
00036 doublereal *d4, doublereal *d5, doublereal *wa1, doublereal *wa2,
00037 doublereal *wa3, doublereal *wr, doublecomplex *u, integer *ldu,
00038 doublecomplex *v, doublecomplex *vp, doublecomplex *tau,
00039 doublecomplex *z__, doublecomplex *work, integer *lwork, doublereal *
00040 rwork, integer *lrwork, integer *iwork, integer *liwork, doublereal *
00041 result, integer *info)
00042 {
00043
00044
00045 static integer ktype[21] = { 1,2,4,4,4,4,4,5,5,5,5,5,8,8,8,9,9,9,9,9,10 };
00046 static integer kmagn[21] = { 1,1,1,1,1,2,3,1,1,1,2,3,1,2,3,1,1,1,2,3,1 };
00047 static integer kmode[21] = { 0,0,4,3,1,4,4,4,3,1,4,4,0,0,0,4,3,1,4,4,3 };
00048
00049
00050 static char fmt_9999[] = "(\002 ZCHKST: \002,a,\002 returned INFO=\002,i"
00051 "6,\002.\002,/9x,\002N=\002,i6,\002, JTYPE=\002,i6,\002, ISEED="
00052 "(\002,3(i5,\002,\002),i5,\002)\002)";
00053 static char fmt_9998[] = "(/1x,a3,\002 -- Complex Hermitian eigenvalue p"
00054 "roblem\002)";
00055 static char fmt_9997[] = "(\002 Matrix types (see ZCHKST for details):"
00056 " \002)";
00057 static char fmt_9996[] = "(/\002 Special Matrices:\002,/\002 1=Zero mat"
00058 "rix. \002,\002 5=Diagonal: clustered ent"
00059 "ries.\002,/\002 2=Identity matrix. \002,\002"
00060 " 6=Diagonal: large, evenly spaced.\002,/\002 3=Diagonal: evenl"
00061 "y spaced entries. \002,\002 7=Diagonal: small, evenly spaced."
00062 "\002,/\002 4=Diagonal: geometr. spaced entries.\002)";
00063 static char fmt_9995[] = "(\002 Dense \002,a,\002 Matrices:\002,/\002 8"
00064 "=Evenly spaced eigenvals. \002,\002 12=Small, evenly "
00065 "spaced eigenvals.\002,/\002 9=Geometrically spaced eigenvals. "
00066 " \002,\002 13=Matrix with random O(1) entries.\002,/\002 10=Cl"
00067 "ustered eigenvalues. \002,\002 14=Matrix with large"
00068 " random entries.\002,/\002 11=Large, evenly spaced eigenvals. "
00069 " \002,\002 15=Matrix with small random entries.\002)";
00070 static char fmt_9994[] = "(\002 16=Positive definite, evenly spaced eige"
00071 "nvalues\002,/\002 17=Positive definite, geometrically spaced eig"
00072 "envlaues\002,/\002 18=Positive definite, clustered eigenvalue"
00073 "s\002,/\002 19=Positive definite, small evenly spaced eigenvalues"
00074 "\002,/\002 20=Positive definite, large evenly spaced eigenvalue"
00075 "s\002,/\002 21=Diagonally dominant tridiagonal, geometrically"
00076 "\002,\002 spaced eigenvalues\002)";
00077 static char fmt_9987[] = "(/\002Test performed: see ZCHKST for details"
00078 ".\002,/)";
00079 static char fmt_9989[] = "(\002 Matrix order=\002,i5,\002, type=\002,i2"
00080 ",\002, seed=\002,4(i4,\002,\002),\002 result \002,i3,\002 is\002"
00081 ",0p,f8.2)";
00082 static char fmt_9988[] = "(\002 Matrix order=\002,i5,\002, type=\002,i2"
00083 ",\002, seed=\002,4(i4,\002,\002),\002 result \002,i3,\002 is\002"
00084 ",1p,d10.3)";
00085
00086
00087 integer a_dim1, a_offset, u_dim1, u_offset, v_dim1, v_offset, z_dim1,
00088 z_offset, i__1, i__2, i__3, i__4, i__5, i__6;
00089 doublereal d__1, d__2, d__3, d__4;
00090 doublecomplex z__1;
00091
00092
00093 double log(doublereal), sqrt(doublereal);
00094 integer pow_ii(integer *, integer *);
00095 double z_abs(doublecomplex *);
00096 void d_cnjg(doublecomplex *, doublecomplex *);
00097 integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00098
00099
00100 integer i__, j, m, n, m2, m3, jc, il, jr, iu;
00101 doublereal vl, vu;
00102 integer nap, lgn;
00103 doublereal ulp;
00104 integer inde;
00105 doublereal cond;
00106 integer nmax;
00107 doublereal unfl, ovfl, temp1, temp2, temp3, temp4;
00108 extern doublereal dsxt1_(integer *, doublereal *, integer *, doublereal *,
00109 integer *, doublereal *, doublereal *, doublereal *);
00110 logical badnn;
00111 integer imode, lwedc;
00112 doublereal dumma[1];
00113 integer iinfo;
00114 doublereal aninv, anorm;
00115 extern int zhet21_(integer *, char *, integer *, integer
00116 *, doublecomplex *, integer *, doublereal *, doublereal *,
00117 doublecomplex *, integer *, doublecomplex *, integer *,
00118 doublecomplex *, doublecomplex *, doublereal *, doublereal *);
00119 integer itemp;
00120 extern int dcopy_(integer *, doublereal *, integer *,
00121 doublereal *, integer *);
00122 integer nmats, jsize;
00123 extern int zhpt21_(integer *, char *, integer *, integer
00124 *, doublecomplex *, doublereal *, doublereal *, doublecomplex *,
00125 integer *, doublecomplex *, doublecomplex *, doublecomplex *,
00126 doublereal *, doublereal *);
00127 integer nerrs, itype, jtype, ntest;
00128 extern int zcopy_(integer *, doublecomplex *, integer *,
00129 doublecomplex *, integer *), zstt21_(integer *, integer *,
00130 doublereal *, doublereal *, doublereal *, doublereal *,
00131 doublecomplex *, integer *, doublecomplex *, doublereal *,
00132 doublereal *), zstt22_(integer *, integer *, integer *,
00133 doublereal *, doublereal *, doublereal *, doublereal *,
00134 doublecomplex *, integer *, doublecomplex *, integer *,
00135 doublereal *, doublereal *);
00136 integer iseed2[4], log2ui;
00137 extern int dlabad_(doublereal *, doublereal *);
00138 extern doublereal dlamch_(char *), dlarnd_(integer *, integer *);
00139 integer liwedc, nblock;
00140 extern int dstech_(integer *, doublereal *, doublereal *,
00141 doublereal *, doublereal *, doublereal *, integer *);
00142 integer idumma[1];
00143 extern int xerbla_(char *, integer *);
00144 integer ioldsd[4];
00145 extern integer ilaenv_(integer *, char *, char *, integer *, integer *,
00146 integer *, integer *);
00147 integer lrwedc;
00148 doublereal abstol;
00149 extern int dlasum_(char *, integer *, integer *, integer
00150 *), dsterf_(integer *, doublereal *, doublereal *,
00151 integer *), dstebz_(char *, char *, integer *, doublereal *,
00152 doublereal *, integer *, integer *, doublereal *, doublereal *,
00153 doublereal *, integer *, integer *, doublereal *, integer *,
00154 integer *, doublereal *, integer *, integer *),
00155 zstedc_(char *, integer *, doublereal *, doublereal *,
00156 doublecomplex *, integer *, doublecomplex *, integer *,
00157 doublereal *, integer *, integer *, integer *, integer *);
00158 integer indrwk;
00159 extern int zhetrd_(char *, integer *, doublecomplex *,
00160 integer *, doublereal *, doublereal *, doublecomplex *,
00161 doublecomplex *, integer *, integer *), zlacpy_(char *,
00162 integer *, integer *, doublecomplex *, integer *, doublecomplex *,
00163 integer *), zlaset_(char *, integer *, integer *,
00164 doublecomplex *, doublecomplex *, doublecomplex *, integer *);
00165 logical tryrac;
00166 integer nsplit;
00167 doublereal rtunfl, rtovfl, ulpinv;
00168 integer mtypes, ntestt;
00169 extern int zhptrd_(char *, integer *, doublecomplex *,
00170 doublereal *, doublereal *, doublecomplex *, integer *),
00171 zlatmr_(integer *, integer *, char *, integer *, char *,
00172 doublecomplex *, integer *, doublereal *, doublecomplex *, char *,
00173 char *, doublecomplex *, integer *, doublereal *, doublecomplex *
00174 , integer *, doublereal *, char *, integer *, integer *, integer *
00175 , doublereal *, doublereal *, char *, doublecomplex *, integer *,
00176 integer *, integer *), zlatms_(integer *, integer *, char *, integer *, char *,
00177 doublereal *, integer *, doublereal *, doublereal *, integer *,
00178 integer *, char *, doublecomplex *, integer *, doublecomplex *,
00179 integer *), zpteqr_(char *, integer *,
00180 doublereal *, doublereal *, doublecomplex *, integer *,
00181 doublereal *, integer *), zstemr_(char *, char *, integer
00182 *, doublereal *, doublereal *, doublereal *, doublereal *,
00183 integer *, integer *, integer *, doublereal *, doublecomplex *,
00184 integer *, integer *, integer *, logical *, doublereal *, integer
00185 *, integer *, integer *, integer *), zstein_(
00186 integer *, doublereal *, doublereal *, integer *, doublereal *,
00187 integer *, integer *, doublecomplex *, integer *, doublereal *,
00188 integer *, integer *, integer *), zsteqr_(char *, integer *,
00189 doublereal *, doublereal *, doublecomplex *, integer *,
00190 doublereal *, integer *), zungtr_(char *, integer *,
00191 doublecomplex *, integer *, doublecomplex *, doublecomplex *,
00192 integer *, integer *), zupgtr_(char *, integer *,
00193 doublecomplex *, doublecomplex *, doublecomplex *, integer *,
00194 doublecomplex *, integer *);
00195
00196
00197 static cilist io___42 = { 0, 0, 0, fmt_9999, 0 };
00198 static cilist io___43 = { 0, 0, 0, fmt_9999, 0 };
00199 static cilist io___44 = { 0, 0, 0, fmt_9999, 0 };
00200 static cilist io___45 = { 0, 0, 0, fmt_9999, 0 };
00201 static cilist io___46 = { 0, 0, 0, fmt_9999, 0 };
00202 static cilist io___48 = { 0, 0, 0, fmt_9999, 0 };
00203 static cilist io___49 = { 0, 0, 0, fmt_9999, 0 };
00204 static cilist io___50 = { 0, 0, 0, fmt_9999, 0 };
00205 static cilist io___51 = { 0, 0, 0, fmt_9999, 0 };
00206 static cilist io___52 = { 0, 0, 0, fmt_9999, 0 };
00207 static cilist io___53 = { 0, 0, 0, fmt_9999, 0 };
00208 static cilist io___54 = { 0, 0, 0, fmt_9999, 0 };
00209 static cilist io___58 = { 0, 0, 0, fmt_9999, 0 };
00210 static cilist io___59 = { 0, 0, 0, fmt_9999, 0 };
00211 static cilist io___67 = { 0, 0, 0, fmt_9999, 0 };
00212 static cilist io___68 = { 0, 0, 0, fmt_9999, 0 };
00213 static cilist io___71 = { 0, 0, 0, fmt_9999, 0 };
00214 static cilist io___73 = { 0, 0, 0, fmt_9999, 0 };
00215 static cilist io___74 = { 0, 0, 0, fmt_9999, 0 };
00216 static cilist io___75 = { 0, 0, 0, fmt_9999, 0 };
00217 static cilist io___78 = { 0, 0, 0, fmt_9999, 0 };
00218 static cilist io___79 = { 0, 0, 0, fmt_9999, 0 };
00219 static cilist io___80 = { 0, 0, 0, fmt_9999, 0 };
00220 static cilist io___81 = { 0, 0, 0, fmt_9999, 0 };
00221 static cilist io___82 = { 0, 0, 0, fmt_9999, 0 };
00222 static cilist io___83 = { 0, 0, 0, fmt_9999, 0 };
00223 static cilist io___84 = { 0, 0, 0, fmt_9999, 0 };
00224 static cilist io___85 = { 0, 0, 0, fmt_9999, 0 };
00225 static cilist io___86 = { 0, 0, 0, fmt_9999, 0 };
00226 static cilist io___87 = { 0, 0, 0, fmt_9999, 0 };
00227 static cilist io___88 = { 0, 0, 0, fmt_9999, 0 };
00228 static cilist io___89 = { 0, 0, 0, fmt_9998, 0 };
00229 static cilist io___90 = { 0, 0, 0, fmt_9997, 0 };
00230 static cilist io___91 = { 0, 0, 0, fmt_9996, 0 };
00231 static cilist io___92 = { 0, 0, 0, fmt_9995, 0 };
00232 static cilist io___93 = { 0, 0, 0, fmt_9994, 0 };
00233 static cilist io___94 = { 0, 0, 0, fmt_9987, 0 };
00234 static cilist io___95 = { 0, 0, 0, fmt_9989, 0 };
00235 static cilist io___96 = { 0, 0, 0, fmt_9988, 0 };
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508
00509
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525
00526
00527
00528
00529
00530
00531
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571
00572
00573
00574
00575
00576
00577
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611
00612
00613
00614
00615
00616
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644
00645
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666 --nn;
00667 --dotype;
00668 --iseed;
00669 a_dim1 = *lda;
00670 a_offset = 1 + a_dim1;
00671 a -= a_offset;
00672 --ap;
00673 --sd;
00674 --se;
00675 --d1;
00676 --d2;
00677 --d3;
00678 --d4;
00679 --d5;
00680 --wa1;
00681 --wa2;
00682 --wa3;
00683 --wr;
00684 z_dim1 = *ldu;
00685 z_offset = 1 + z_dim1;
00686 z__ -= z_offset;
00687 v_dim1 = *ldu;
00688 v_offset = 1 + v_dim1;
00689 v -= v_offset;
00690 u_dim1 = *ldu;
00691 u_offset = 1 + u_dim1;
00692 u -= u_offset;
00693 --vp;
00694 --tau;
00695 --work;
00696 --rwork;
00697 --iwork;
00698 --result;
00699
00700
00701
00702
00703
00704
00705 idumma[0] = 1;
00706
00707
00708
00709 ntestt = 0;
00710 *info = 0;
00711
00712
00713
00714 badnn = FALSE_;
00715 tryrac = TRUE_;
00716 nmax = 1;
00717 i__1 = *nsizes;
00718 for (j = 1; j <= i__1; ++j) {
00719
00720 i__2 = nmax, i__3 = nn[j];
00721 nmax = max(i__2,i__3);
00722 if (nn[j] < 0) {
00723 badnn = TRUE_;
00724 }
00725
00726 }
00727
00728 nblock = ilaenv_(&c__1, "ZHETRD", "L", &nmax, &c_n1, &c_n1, &c_n1);
00729
00730 i__1 = nmax, i__2 = max(1,nblock);
00731 nblock = min(i__1,i__2);
00732
00733
00734
00735 if (*nsizes < 0) {
00736 *info = -1;
00737 } else if (badnn) {
00738 *info = -2;
00739 } else if (*ntypes < 0) {
00740 *info = -3;
00741 } else if (*lda < nmax) {
00742 *info = -9;
00743 } else if (*ldu < nmax) {
00744 *info = -23;
00745 } else {
00746
00747 i__1 = max(2,nmax);
00748 if (i__1 * i__1 << 1 > *lwork) {
00749 *info = -29;
00750 }
00751 }
00752
00753 if (*info != 0) {
00754 i__1 = -(*info);
00755 xerbla_("ZCHKST", &i__1);
00756 return 0;
00757 }
00758
00759
00760
00761 if (*nsizes == 0 || *ntypes == 0) {
00762 return 0;
00763 }
00764
00765
00766
00767 unfl = dlamch_("Safe minimum");
00768 ovfl = 1. / unfl;
00769 dlabad_(&unfl, &ovfl);
00770 ulp = dlamch_("Epsilon") * dlamch_("Base");
00771 ulpinv = 1. / ulp;
00772 log2ui = (integer) (log(ulpinv) / log(2.));
00773 rtunfl = sqrt(unfl);
00774 rtovfl = sqrt(ovfl);
00775
00776
00777
00778 for (i__ = 1; i__ <= 4; ++i__) {
00779 iseed2[i__ - 1] = iseed[i__];
00780
00781 }
00782 nerrs = 0;
00783 nmats = 0;
00784
00785 i__1 = *nsizes;
00786 for (jsize = 1; jsize <= i__1; ++jsize) {
00787 n = nn[jsize];
00788 if (n > 0) {
00789 lgn = (integer) (log((doublereal) n) / log(2.));
00790 if (pow_ii(&c__2, &lgn) < n) {
00791 ++lgn;
00792 }
00793 if (pow_ii(&c__2, &lgn) < n) {
00794 ++lgn;
00795 }
00796
00797 i__2 = n;
00798 lwedc = (n << 2) + 1 + (n << 1) * lgn + i__2 * i__2 * 3;
00799
00800 i__2 = n;
00801 lrwedc = n * 3 + 1 + (n << 1) * lgn + i__2 * i__2 * 3;
00802 liwedc = n * 6 + 6 + n * 5 * lgn;
00803 } else {
00804 lwedc = 8;
00805 lrwedc = 7;
00806 liwedc = 12;
00807 }
00808 nap = n * (n + 1) / 2;
00809 aninv = 1. / (doublereal) max(1,n);
00810
00811 if (*nsizes != 1) {
00812 mtypes = min(21,*ntypes);
00813 } else {
00814 mtypes = min(22,*ntypes);
00815 }
00816
00817 i__2 = mtypes;
00818 for (jtype = 1; jtype <= i__2; ++jtype) {
00819 if (! dotype[jtype]) {
00820 goto L300;
00821 }
00822 ++nmats;
00823 ntest = 0;
00824
00825 for (j = 1; j <= 4; ++j) {
00826 ioldsd[j - 1] = iseed[j];
00827
00828 }
00829
00830
00831
00832
00833
00834
00835
00836
00837
00838
00839
00840
00841
00842
00843
00844
00845
00846 if (mtypes > 21) {
00847 goto L100;
00848 }
00849
00850 itype = ktype[jtype - 1];
00851 imode = kmode[jtype - 1];
00852
00853
00854
00855 switch (kmagn[jtype - 1]) {
00856 case 1: goto L40;
00857 case 2: goto L50;
00858 case 3: goto L60;
00859 }
00860
00861 L40:
00862 anorm = 1.;
00863 goto L70;
00864
00865 L50:
00866 anorm = rtovfl * ulp * aninv;
00867 goto L70;
00868
00869 L60:
00870 anorm = rtunfl * n * ulpinv;
00871 goto L70;
00872
00873 L70:
00874
00875 zlaset_("Full", lda, &n, &c_b1, &c_b1, &a[a_offset], lda);
00876 iinfo = 0;
00877 if (jtype <= 15) {
00878 cond = ulpinv;
00879 } else {
00880 cond = ulpinv * aninv / 10.;
00881 }
00882
00883
00884
00885
00886
00887 if (itype == 1) {
00888 iinfo = 0;
00889
00890 } else if (itype == 2) {
00891
00892
00893
00894 i__3 = n;
00895 for (jc = 1; jc <= i__3; ++jc) {
00896 i__4 = jc + jc * a_dim1;
00897 a[i__4].r = anorm, a[i__4].i = 0.;
00898
00899 }
00900
00901 } else if (itype == 4) {
00902
00903
00904
00905 zlatms_(&n, &n, "S", &iseed[1], "H", &rwork[1], &imode, &cond,
00906 &anorm, &c__0, &c__0, "N", &a[a_offset], lda, &work[
00907 1], &iinfo);
00908
00909
00910 } else if (itype == 5) {
00911
00912
00913
00914 zlatms_(&n, &n, "S", &iseed[1], "H", &rwork[1], &imode, &cond,
00915 &anorm, &n, &n, "N", &a[a_offset], lda, &work[1], &
00916 iinfo);
00917
00918 } else if (itype == 7) {
00919
00920
00921
00922 zlatmr_(&n, &n, "S", &iseed[1], "H", &work[1], &c__6, &c_b39,
00923 &c_b2, "T", "N", &work[n + 1], &c__1, &c_b39, &work[(
00924 n << 1) + 1], &c__1, &c_b39, "N", idumma, &c__0, &
00925 c__0, &c_b49, &anorm, "NO", &a[a_offset], lda, &iwork[
00926 1], &iinfo);
00927
00928 } else if (itype == 8) {
00929
00930
00931
00932 zlatmr_(&n, &n, "S", &iseed[1], "H", &work[1], &c__6, &c_b39,
00933 &c_b2, "T", "N", &work[n + 1], &c__1, &c_b39, &work[(
00934 n << 1) + 1], &c__1, &c_b39, "N", idumma, &n, &n, &
00935 c_b49, &anorm, "NO", &a[a_offset], lda, &iwork[1], &
00936 iinfo);
00937
00938 } else if (itype == 9) {
00939
00940
00941
00942 zlatms_(&n, &n, "S", &iseed[1], "P", &rwork[1], &imode, &cond,
00943 &anorm, &n, &n, "N", &a[a_offset], lda, &work[1], &
00944 iinfo);
00945
00946 } else if (itype == 10) {
00947
00948
00949
00950 zlatms_(&n, &n, "S", &iseed[1], "P", &rwork[1], &imode, &cond,
00951 &anorm, &c__1, &c__1, "N", &a[a_offset], lda, &work[
00952 1], &iinfo);
00953 i__3 = n;
00954 for (i__ = 2; i__ <= i__3; ++i__) {
00955 temp1 = z_abs(&a[i__ - 1 + i__ * a_dim1]);
00956 i__4 = i__ - 1 + (i__ - 1) * a_dim1;
00957 i__5 = i__ + i__ * a_dim1;
00958 z__1.r = a[i__4].r * a[i__5].r - a[i__4].i * a[i__5].i,
00959 z__1.i = a[i__4].r * a[i__5].i + a[i__4].i * a[
00960 i__5].r;
00961 temp2 = sqrt(z_abs(&z__1));
00962 if (temp1 > temp2 * .5) {
00963 i__4 = i__ - 1 + i__ * a_dim1;
00964 i__5 = i__ - 1 + i__ * a_dim1;
00965 d__1 = temp2 * .5 / (unfl + temp1);
00966 z__1.r = d__1 * a[i__5].r, z__1.i = d__1 * a[i__5].i;
00967 a[i__4].r = z__1.r, a[i__4].i = z__1.i;
00968 i__4 = i__ + (i__ - 1) * a_dim1;
00969 d_cnjg(&z__1, &a[i__ - 1 + i__ * a_dim1]);
00970 a[i__4].r = z__1.r, a[i__4].i = z__1.i;
00971 }
00972
00973 }
00974
00975 } else {
00976
00977 iinfo = 1;
00978 }
00979
00980 if (iinfo != 0) {
00981 io___42.ciunit = *nounit;
00982 s_wsfe(&io___42);
00983 do_fio(&c__1, "Generator", (ftnlen)9);
00984 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00985 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00986 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
00987 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
00988 e_wsfe();
00989 *info = abs(iinfo);
00990 return 0;
00991 }
00992
00993 L100:
00994
00995
00996
00997
00998 zlacpy_("U", &n, &n, &a[a_offset], lda, &v[v_offset], ldu);
00999
01000 ntest = 1;
01001 zhetrd_("U", &n, &v[v_offset], ldu, &sd[1], &se[1], &tau[1], &
01002 work[1], lwork, &iinfo);
01003
01004 if (iinfo != 0) {
01005 io___43.ciunit = *nounit;
01006 s_wsfe(&io___43);
01007 do_fio(&c__1, "ZHETRD(U)", (ftnlen)9);
01008 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01009 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01010 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01011 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01012 e_wsfe();
01013 *info = abs(iinfo);
01014 if (iinfo < 0) {
01015 return 0;
01016 } else {
01017 result[1] = ulpinv;
01018 goto L280;
01019 }
01020 }
01021
01022 zlacpy_("U", &n, &n, &v[v_offset], ldu, &u[u_offset], ldu);
01023
01024 ntest = 2;
01025 zungtr_("U", &n, &u[u_offset], ldu, &tau[1], &work[1], lwork, &
01026 iinfo);
01027 if (iinfo != 0) {
01028 io___44.ciunit = *nounit;
01029 s_wsfe(&io___44);
01030 do_fio(&c__1, "ZUNGTR(U)", (ftnlen)9);
01031 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01032 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01033 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01034 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01035 e_wsfe();
01036 *info = abs(iinfo);
01037 if (iinfo < 0) {
01038 return 0;
01039 } else {
01040 result[2] = ulpinv;
01041 goto L280;
01042 }
01043 }
01044
01045
01046
01047 zhet21_(&c__2, "Upper", &n, &c__1, &a[a_offset], lda, &sd[1], &se[
01048 1], &u[u_offset], ldu, &v[v_offset], ldu, &tau[1], &work[
01049 1], &rwork[1], &result[1]);
01050 zhet21_(&c__3, "Upper", &n, &c__1, &a[a_offset], lda, &sd[1], &se[
01051 1], &u[u_offset], ldu, &v[v_offset], ldu, &tau[1], &work[
01052 1], &rwork[1], &result[2]);
01053
01054
01055
01056
01057 zlacpy_("L", &n, &n, &a[a_offset], lda, &v[v_offset], ldu);
01058
01059 ntest = 3;
01060 zhetrd_("L", &n, &v[v_offset], ldu, &sd[1], &se[1], &tau[1], &
01061 work[1], lwork, &iinfo);
01062
01063 if (iinfo != 0) {
01064 io___45.ciunit = *nounit;
01065 s_wsfe(&io___45);
01066 do_fio(&c__1, "ZHETRD(L)", (ftnlen)9);
01067 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01068 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01069 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01070 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01071 e_wsfe();
01072 *info = abs(iinfo);
01073 if (iinfo < 0) {
01074 return 0;
01075 } else {
01076 result[3] = ulpinv;
01077 goto L280;
01078 }
01079 }
01080
01081 zlacpy_("L", &n, &n, &v[v_offset], ldu, &u[u_offset], ldu);
01082
01083 ntest = 4;
01084 zungtr_("L", &n, &u[u_offset], ldu, &tau[1], &work[1], lwork, &
01085 iinfo);
01086 if (iinfo != 0) {
01087 io___46.ciunit = *nounit;
01088 s_wsfe(&io___46);
01089 do_fio(&c__1, "ZUNGTR(L)", (ftnlen)9);
01090 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01091 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01092 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01093 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01094 e_wsfe();
01095 *info = abs(iinfo);
01096 if (iinfo < 0) {
01097 return 0;
01098 } else {
01099 result[4] = ulpinv;
01100 goto L280;
01101 }
01102 }
01103
01104 zhet21_(&c__2, "Lower", &n, &c__1, &a[a_offset], lda, &sd[1], &se[
01105 1], &u[u_offset], ldu, &v[v_offset], ldu, &tau[1], &work[
01106 1], &rwork[1], &result[3]);
01107 zhet21_(&c__3, "Lower", &n, &c__1, &a[a_offset], lda, &sd[1], &se[
01108 1], &u[u_offset], ldu, &v[v_offset], ldu, &tau[1], &work[
01109 1], &rwork[1], &result[4]);
01110
01111
01112
01113 i__ = 0;
01114 i__3 = n;
01115 for (jc = 1; jc <= i__3; ++jc) {
01116 i__4 = jc;
01117 for (jr = 1; jr <= i__4; ++jr) {
01118 ++i__;
01119 i__5 = i__;
01120 i__6 = jr + jc * a_dim1;
01121 ap[i__5].r = a[i__6].r, ap[i__5].i = a[i__6].i;
01122
01123 }
01124
01125 }
01126
01127
01128
01129 zcopy_(&nap, &ap[1], &c__1, &vp[1], &c__1);
01130
01131 ntest = 5;
01132 zhptrd_("U", &n, &vp[1], &sd[1], &se[1], &tau[1], &iinfo);
01133
01134 if (iinfo != 0) {
01135 io___48.ciunit = *nounit;
01136 s_wsfe(&io___48);
01137 do_fio(&c__1, "ZHPTRD(U)", (ftnlen)9);
01138 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01139 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01140 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01141 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01142 e_wsfe();
01143 *info = abs(iinfo);
01144 if (iinfo < 0) {
01145 return 0;
01146 } else {
01147 result[5] = ulpinv;
01148 goto L280;
01149 }
01150 }
01151
01152 ntest = 6;
01153 zupgtr_("U", &n, &vp[1], &tau[1], &u[u_offset], ldu, &work[1], &
01154 iinfo);
01155 if (iinfo != 0) {
01156 io___49.ciunit = *nounit;
01157 s_wsfe(&io___49);
01158 do_fio(&c__1, "ZUPGTR(U)", (ftnlen)9);
01159 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01160 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01161 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01162 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01163 e_wsfe();
01164 *info = abs(iinfo);
01165 if (iinfo < 0) {
01166 return 0;
01167 } else {
01168 result[6] = ulpinv;
01169 goto L280;
01170 }
01171 }
01172
01173
01174
01175 zhpt21_(&c__2, "Upper", &n, &c__1, &ap[1], &sd[1], &se[1], &u[
01176 u_offset], ldu, &vp[1], &tau[1], &work[1], &rwork[1], &
01177 result[5]);
01178 zhpt21_(&c__3, "Upper", &n, &c__1, &ap[1], &sd[1], &se[1], &u[
01179 u_offset], ldu, &vp[1], &tau[1], &work[1], &rwork[1], &
01180 result[6]);
01181
01182
01183
01184 i__ = 0;
01185 i__3 = n;
01186 for (jc = 1; jc <= i__3; ++jc) {
01187 i__4 = n;
01188 for (jr = jc; jr <= i__4; ++jr) {
01189 ++i__;
01190 i__5 = i__;
01191 i__6 = jr + jc * a_dim1;
01192 ap[i__5].r = a[i__6].r, ap[i__5].i = a[i__6].i;
01193
01194 }
01195
01196 }
01197
01198
01199
01200 zcopy_(&nap, &ap[1], &c__1, &vp[1], &c__1);
01201
01202 ntest = 7;
01203 zhptrd_("L", &n, &vp[1], &sd[1], &se[1], &tau[1], &iinfo);
01204
01205 if (iinfo != 0) {
01206 io___50.ciunit = *nounit;
01207 s_wsfe(&io___50);
01208 do_fio(&c__1, "ZHPTRD(L)", (ftnlen)9);
01209 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01210 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01211 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01212 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01213 e_wsfe();
01214 *info = abs(iinfo);
01215 if (iinfo < 0) {
01216 return 0;
01217 } else {
01218 result[7] = ulpinv;
01219 goto L280;
01220 }
01221 }
01222
01223 ntest = 8;
01224 zupgtr_("L", &n, &vp[1], &tau[1], &u[u_offset], ldu, &work[1], &
01225 iinfo);
01226 if (iinfo != 0) {
01227 io___51.ciunit = *nounit;
01228 s_wsfe(&io___51);
01229 do_fio(&c__1, "ZUPGTR(L)", (ftnlen)9);
01230 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01231 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01232 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01233 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01234 e_wsfe();
01235 *info = abs(iinfo);
01236 if (iinfo < 0) {
01237 return 0;
01238 } else {
01239 result[8] = ulpinv;
01240 goto L280;
01241 }
01242 }
01243
01244 zhpt21_(&c__2, "Lower", &n, &c__1, &ap[1], &sd[1], &se[1], &u[
01245 u_offset], ldu, &vp[1], &tau[1], &work[1], &rwork[1], &
01246 result[7]);
01247 zhpt21_(&c__3, "Lower", &n, &c__1, &ap[1], &sd[1], &se[1], &u[
01248 u_offset], ldu, &vp[1], &tau[1], &work[1], &rwork[1], &
01249 result[8]);
01250
01251
01252
01253
01254
01255 dcopy_(&n, &sd[1], &c__1, &d1[1], &c__1);
01256 if (n > 0) {
01257 i__3 = n - 1;
01258 dcopy_(&i__3, &se[1], &c__1, &rwork[1], &c__1);
01259 }
01260 zlaset_("Full", &n, &n, &c_b1, &c_b2, &z__[z_offset], ldu);
01261
01262 ntest = 9;
01263 zsteqr_("V", &n, &d1[1], &rwork[1], &z__[z_offset], ldu, &rwork[n
01264 + 1], &iinfo);
01265 if (iinfo != 0) {
01266 io___52.ciunit = *nounit;
01267 s_wsfe(&io___52);
01268 do_fio(&c__1, "ZSTEQR(V)", (ftnlen)9);
01269 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01270 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01271 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01272 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01273 e_wsfe();
01274 *info = abs(iinfo);
01275 if (iinfo < 0) {
01276 return 0;
01277 } else {
01278 result[9] = ulpinv;
01279 goto L280;
01280 }
01281 }
01282
01283
01284
01285 dcopy_(&n, &sd[1], &c__1, &d2[1], &c__1);
01286 if (n > 0) {
01287 i__3 = n - 1;
01288 dcopy_(&i__3, &se[1], &c__1, &rwork[1], &c__1);
01289 }
01290
01291 ntest = 11;
01292 zsteqr_("N", &n, &d2[1], &rwork[1], &work[1], ldu, &rwork[n + 1],
01293 &iinfo);
01294 if (iinfo != 0) {
01295 io___53.ciunit = *nounit;
01296 s_wsfe(&io___53);
01297 do_fio(&c__1, "ZSTEQR(N)", (ftnlen)9);
01298 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01299 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01300 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01301 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01302 e_wsfe();
01303 *info = abs(iinfo);
01304 if (iinfo < 0) {
01305 return 0;
01306 } else {
01307 result[11] = ulpinv;
01308 goto L280;
01309 }
01310 }
01311
01312
01313
01314 dcopy_(&n, &sd[1], &c__1, &d3[1], &c__1);
01315 if (n > 0) {
01316 i__3 = n - 1;
01317 dcopy_(&i__3, &se[1], &c__1, &rwork[1], &c__1);
01318 }
01319
01320 ntest = 12;
01321 dsterf_(&n, &d3[1], &rwork[1], &iinfo);
01322 if (iinfo != 0) {
01323 io___54.ciunit = *nounit;
01324 s_wsfe(&io___54);
01325 do_fio(&c__1, "DSTERF", (ftnlen)6);
01326 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01327 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01328 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01329 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01330 e_wsfe();
01331 *info = abs(iinfo);
01332 if (iinfo < 0) {
01333 return 0;
01334 } else {
01335 result[12] = ulpinv;
01336 goto L280;
01337 }
01338 }
01339
01340
01341
01342 zstt21_(&n, &c__0, &sd[1], &se[1], &d1[1], dumma, &z__[z_offset],
01343 ldu, &work[1], &rwork[1], &result[9]);
01344
01345
01346
01347 temp1 = 0.;
01348 temp2 = 0.;
01349 temp3 = 0.;
01350 temp4 = 0.;
01351
01352 i__3 = n;
01353 for (j = 1; j <= i__3; ++j) {
01354
01355 d__3 = temp1, d__4 = (d__1 = d1[j], abs(d__1)), d__3 = max(
01356 d__3,d__4), d__4 = (d__2 = d2[j], abs(d__2));
01357 temp1 = max(d__3,d__4);
01358
01359 d__2 = temp2, d__3 = (d__1 = d1[j] - d2[j], abs(d__1));
01360 temp2 = max(d__2,d__3);
01361
01362 d__3 = temp3, d__4 = (d__1 = d1[j], abs(d__1)), d__3 = max(
01363 d__3,d__4), d__4 = (d__2 = d3[j], abs(d__2));
01364 temp3 = max(d__3,d__4);
01365
01366 d__2 = temp4, d__3 = (d__1 = d1[j] - d3[j], abs(d__1));
01367 temp4 = max(d__2,d__3);
01368
01369 }
01370
01371
01372 d__1 = unfl, d__2 = ulp * max(temp1,temp2);
01373 result[11] = temp2 / max(d__1,d__2);
01374
01375 d__1 = unfl, d__2 = ulp * max(temp3,temp4);
01376 result[12] = temp4 / max(d__1,d__2);
01377
01378
01379
01380
01381 ntest = 13;
01382 temp1 = *thresh * (.5 - ulp);
01383
01384 i__3 = log2ui;
01385 for (j = 0; j <= i__3; ++j) {
01386 dstech_(&n, &sd[1], &se[1], &d1[1], &temp1, &rwork[1], &iinfo)
01387 ;
01388 if (iinfo == 0) {
01389 goto L170;
01390 }
01391 temp1 *= 2.;
01392
01393 }
01394
01395 L170:
01396 result[13] = temp1;
01397
01398
01399
01400
01401 if (jtype > 15) {
01402
01403
01404
01405 dcopy_(&n, &sd[1], &c__1, &d4[1], &c__1);
01406 if (n > 0) {
01407 i__3 = n - 1;
01408 dcopy_(&i__3, &se[1], &c__1, &rwork[1], &c__1);
01409 }
01410 zlaset_("Full", &n, &n, &c_b1, &c_b2, &z__[z_offset], ldu);
01411
01412 ntest = 14;
01413 zpteqr_("V", &n, &d4[1], &rwork[1], &z__[z_offset], ldu, &
01414 rwork[n + 1], &iinfo);
01415 if (iinfo != 0) {
01416 io___58.ciunit = *nounit;
01417 s_wsfe(&io___58);
01418 do_fio(&c__1, "ZPTEQR(V)", (ftnlen)9);
01419 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01420 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01421 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01422 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer))
01423 ;
01424 e_wsfe();
01425 *info = abs(iinfo);
01426 if (iinfo < 0) {
01427 return 0;
01428 } else {
01429 result[14] = ulpinv;
01430 goto L280;
01431 }
01432 }
01433
01434
01435
01436 zstt21_(&n, &c__0, &sd[1], &se[1], &d4[1], dumma, &z__[
01437 z_offset], ldu, &work[1], &rwork[1], &result[14]);
01438
01439
01440
01441 dcopy_(&n, &sd[1], &c__1, &d5[1], &c__1);
01442 if (n > 0) {
01443 i__3 = n - 1;
01444 dcopy_(&i__3, &se[1], &c__1, &rwork[1], &c__1);
01445 }
01446
01447 ntest = 16;
01448 zpteqr_("N", &n, &d5[1], &rwork[1], &z__[z_offset], ldu, &
01449 rwork[n + 1], &iinfo);
01450 if (iinfo != 0) {
01451 io___59.ciunit = *nounit;
01452 s_wsfe(&io___59);
01453 do_fio(&c__1, "ZPTEQR(N)", (ftnlen)9);
01454 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01455 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01456 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01457 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer))
01458 ;
01459 e_wsfe();
01460 *info = abs(iinfo);
01461 if (iinfo < 0) {
01462 return 0;
01463 } else {
01464 result[16] = ulpinv;
01465 goto L280;
01466 }
01467 }
01468
01469
01470
01471 temp1 = 0.;
01472 temp2 = 0.;
01473 i__3 = n;
01474 for (j = 1; j <= i__3; ++j) {
01475
01476 d__3 = temp1, d__4 = (d__1 = d4[j], abs(d__1)), d__3 =
01477 max(d__3,d__4), d__4 = (d__2 = d5[j], abs(d__2));
01478 temp1 = max(d__3,d__4);
01479
01480 d__2 = temp2, d__3 = (d__1 = d4[j] - d5[j], abs(d__1));
01481 temp2 = max(d__2,d__3);
01482
01483 }
01484
01485
01486 d__1 = unfl, d__2 = ulp * 100. * max(temp1,temp2);
01487 result[16] = temp2 / max(d__1,d__2);
01488 } else {
01489 result[14] = 0.;
01490 result[15] = 0.;
01491 result[16] = 0.;
01492 }
01493
01494
01495
01496
01497
01498
01499 vl = 0.;
01500 vu = 0.;
01501 il = 0;
01502 iu = 0;
01503 if (jtype == 21) {
01504 ntest = 17;
01505 abstol = unfl + unfl;
01506 dstebz_("A", "E", &n, &vl, &vu, &il, &iu, &abstol, &sd[1], &
01507 se[1], &m, &nsplit, &wr[1], &iwork[1], &iwork[n + 1],
01508 &rwork[1], &iwork[(n << 1) + 1], &iinfo);
01509 if (iinfo != 0) {
01510 io___67.ciunit = *nounit;
01511 s_wsfe(&io___67);
01512 do_fio(&c__1, "DSTEBZ(A,rel)", (ftnlen)13);
01513 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01514 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01515 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01516 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer))
01517 ;
01518 e_wsfe();
01519 *info = abs(iinfo);
01520 if (iinfo < 0) {
01521 return 0;
01522 } else {
01523 result[17] = ulpinv;
01524 goto L280;
01525 }
01526 }
01527
01528
01529
01530 temp2 = (n * 2. - 1.) * 2. * ulp * 3. / .0625;
01531
01532 temp1 = 0.;
01533 i__3 = n;
01534 for (j = 1; j <= i__3; ++j) {
01535
01536 d__3 = temp1, d__4 = (d__2 = d4[j] - wr[n - j + 1], abs(
01537 d__2)) / (abstol + (d__1 = d4[j], abs(d__1)));
01538 temp1 = max(d__3,d__4);
01539
01540 }
01541
01542 result[17] = temp1 / temp2;
01543 } else {
01544 result[17] = 0.;
01545 }
01546
01547
01548
01549 ntest = 18;
01550 abstol = unfl + unfl;
01551 dstebz_("A", "E", &n, &vl, &vu, &il, &iu, &abstol, &sd[1], &se[1],
01552 &m, &nsplit, &wa1[1], &iwork[1], &iwork[n + 1], &rwork[1]
01553 , &iwork[(n << 1) + 1], &iinfo);
01554 if (iinfo != 0) {
01555 io___68.ciunit = *nounit;
01556 s_wsfe(&io___68);
01557 do_fio(&c__1, "DSTEBZ(A)", (ftnlen)9);
01558 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01559 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01560 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01561 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01562 e_wsfe();
01563 *info = abs(iinfo);
01564 if (iinfo < 0) {
01565 return 0;
01566 } else {
01567 result[18] = ulpinv;
01568 goto L280;
01569 }
01570 }
01571
01572
01573
01574 temp1 = 0.;
01575 temp2 = 0.;
01576 i__3 = n;
01577 for (j = 1; j <= i__3; ++j) {
01578
01579 d__3 = temp1, d__4 = (d__1 = d3[j], abs(d__1)), d__3 = max(
01580 d__3,d__4), d__4 = (d__2 = wa1[j], abs(d__2));
01581 temp1 = max(d__3,d__4);
01582
01583 d__2 = temp2, d__3 = (d__1 = d3[j] - wa1[j], abs(d__1));
01584 temp2 = max(d__2,d__3);
01585
01586 }
01587
01588
01589 d__1 = unfl, d__2 = ulp * max(temp1,temp2);
01590 result[18] = temp2 / max(d__1,d__2);
01591
01592
01593
01594
01595 ntest = 19;
01596 if (n <= 1) {
01597 il = 1;
01598 iu = n;
01599 } else {
01600 il = (n - 1) * (integer) dlarnd_(&c__1, iseed2) + 1;
01601 iu = (n - 1) * (integer) dlarnd_(&c__1, iseed2) + 1;
01602 if (iu < il) {
01603 itemp = iu;
01604 iu = il;
01605 il = itemp;
01606 }
01607 }
01608
01609 dstebz_("I", "E", &n, &vl, &vu, &il, &iu, &abstol, &sd[1], &se[1],
01610 &m2, &nsplit, &wa2[1], &iwork[1], &iwork[n + 1], &rwork[
01611 1], &iwork[(n << 1) + 1], &iinfo);
01612 if (iinfo != 0) {
01613 io___71.ciunit = *nounit;
01614 s_wsfe(&io___71);
01615 do_fio(&c__1, "DSTEBZ(I)", (ftnlen)9);
01616 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01617 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01618 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01619 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01620 e_wsfe();
01621 *info = abs(iinfo);
01622 if (iinfo < 0) {
01623 return 0;
01624 } else {
01625 result[19] = ulpinv;
01626 goto L280;
01627 }
01628 }
01629
01630
01631
01632
01633 if (n > 0) {
01634 if (il != 1) {
01635
01636 d__1 = (wa1[il] - wa1[il - 1]) * .5, d__2 = ulp * anorm,
01637 d__1 = max(d__1,d__2), d__2 = rtunfl * 2.;
01638 vl = wa1[il] - max(d__1,d__2);
01639 } else {
01640
01641 d__1 = (wa1[n] - wa1[1]) * .5, d__2 = ulp * anorm, d__1 =
01642 max(d__1,d__2), d__2 = rtunfl * 2.;
01643 vl = wa1[1] - max(d__1,d__2);
01644 }
01645 if (iu != n) {
01646
01647 d__1 = (wa1[iu + 1] - wa1[iu]) * .5, d__2 = ulp * anorm,
01648 d__1 = max(d__1,d__2), d__2 = rtunfl * 2.;
01649 vu = wa1[iu] + max(d__1,d__2);
01650 } else {
01651
01652 d__1 = (wa1[n] - wa1[1]) * .5, d__2 = ulp * anorm, d__1 =
01653 max(d__1,d__2), d__2 = rtunfl * 2.;
01654 vu = wa1[n] + max(d__1,d__2);
01655 }
01656 } else {
01657 vl = 0.;
01658 vu = 1.;
01659 }
01660
01661 dstebz_("V", "E", &n, &vl, &vu, &il, &iu, &abstol, &sd[1], &se[1],
01662 &m3, &nsplit, &wa3[1], &iwork[1], &iwork[n + 1], &rwork[
01663 1], &iwork[(n << 1) + 1], &iinfo);
01664 if (iinfo != 0) {
01665 io___73.ciunit = *nounit;
01666 s_wsfe(&io___73);
01667 do_fio(&c__1, "DSTEBZ(V)", (ftnlen)9);
01668 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01669 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01670 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01671 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01672 e_wsfe();
01673 *info = abs(iinfo);
01674 if (iinfo < 0) {
01675 return 0;
01676 } else {
01677 result[19] = ulpinv;
01678 goto L280;
01679 }
01680 }
01681
01682 if (m3 == 0 && n != 0) {
01683 result[19] = ulpinv;
01684 goto L280;
01685 }
01686
01687
01688
01689 temp1 = dsxt1_(&c__1, &wa2[1], &m2, &wa3[1], &m3, &abstol, &ulp, &
01690 unfl);
01691 temp2 = dsxt1_(&c__1, &wa3[1], &m3, &wa2[1], &m2, &abstol, &ulp, &
01692 unfl);
01693 if (n > 0) {
01694
01695 d__2 = (d__1 = wa1[n], abs(d__1)), d__3 = abs(wa1[1]);
01696 temp3 = max(d__2,d__3);
01697 } else {
01698 temp3 = 0.;
01699 }
01700
01701
01702 d__1 = unfl, d__2 = temp3 * ulp;
01703 result[19] = (temp1 + temp2) / max(d__1,d__2);
01704
01705
01706
01707
01708
01709 ntest = 21;
01710 dstebz_("A", "B", &n, &vl, &vu, &il, &iu, &abstol, &sd[1], &se[1],
01711 &m, &nsplit, &wa1[1], &iwork[1], &iwork[n + 1], &rwork[1]
01712 , &iwork[(n << 1) + 1], &iinfo);
01713 if (iinfo != 0) {
01714 io___74.ciunit = *nounit;
01715 s_wsfe(&io___74);
01716 do_fio(&c__1, "DSTEBZ(A,B)", (ftnlen)11);
01717 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01718 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01719 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01720 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01721 e_wsfe();
01722 *info = abs(iinfo);
01723 if (iinfo < 0) {
01724 return 0;
01725 } else {
01726 result[20] = ulpinv;
01727 result[21] = ulpinv;
01728 goto L280;
01729 }
01730 }
01731
01732 zstein_(&n, &sd[1], &se[1], &m, &wa1[1], &iwork[1], &iwork[n + 1],
01733 &z__[z_offset], ldu, &rwork[1], &iwork[(n << 1) + 1], &
01734 iwork[n * 3 + 1], &iinfo);
01735 if (iinfo != 0) {
01736 io___75.ciunit = *nounit;
01737 s_wsfe(&io___75);
01738 do_fio(&c__1, "ZSTEIN", (ftnlen)6);
01739 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01740 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01741 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01742 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01743 e_wsfe();
01744 *info = abs(iinfo);
01745 if (iinfo < 0) {
01746 return 0;
01747 } else {
01748 result[20] = ulpinv;
01749 result[21] = ulpinv;
01750 goto L280;
01751 }
01752 }
01753
01754
01755
01756 zstt21_(&n, &c__0, &sd[1], &se[1], &wa1[1], dumma, &z__[z_offset],
01757 ldu, &work[1], &rwork[1], &result[20]);
01758
01759
01760
01761
01762
01763 inde = 1;
01764 indrwk = inde + n;
01765 dcopy_(&n, &sd[1], &c__1, &d1[1], &c__1);
01766 if (n > 0) {
01767 i__3 = n - 1;
01768 dcopy_(&i__3, &se[1], &c__1, &rwork[inde], &c__1);
01769 }
01770 zlaset_("Full", &n, &n, &c_b1, &c_b2, &z__[z_offset], ldu);
01771
01772 ntest = 22;
01773 zstedc_("I", &n, &d1[1], &rwork[inde], &z__[z_offset], ldu, &work[
01774 1], &lwedc, &rwork[indrwk], &lrwedc, &iwork[1], &liwedc, &
01775 iinfo);
01776 if (iinfo != 0) {
01777 io___78.ciunit = *nounit;
01778 s_wsfe(&io___78);
01779 do_fio(&c__1, "ZSTEDC(I)", (ftnlen)9);
01780 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01781 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01782 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01783 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01784 e_wsfe();
01785 *info = abs(iinfo);
01786 if (iinfo < 0) {
01787 return 0;
01788 } else {
01789 result[22] = ulpinv;
01790 goto L280;
01791 }
01792 }
01793
01794
01795
01796 zstt21_(&n, &c__0, &sd[1], &se[1], &d1[1], dumma, &z__[z_offset],
01797 ldu, &work[1], &rwork[1], &result[22]);
01798
01799
01800
01801
01802
01803 dcopy_(&n, &sd[1], &c__1, &d1[1], &c__1);
01804 if (n > 0) {
01805 i__3 = n - 1;
01806 dcopy_(&i__3, &se[1], &c__1, &rwork[inde], &c__1);
01807 }
01808 zlaset_("Full", &n, &n, &c_b1, &c_b2, &z__[z_offset], ldu);
01809
01810 ntest = 24;
01811 zstedc_("V", &n, &d1[1], &rwork[inde], &z__[z_offset], ldu, &work[
01812 1], &lwedc, &rwork[indrwk], &lrwedc, &iwork[1], &liwedc, &
01813 iinfo);
01814 if (iinfo != 0) {
01815 io___79.ciunit = *nounit;
01816 s_wsfe(&io___79);
01817 do_fio(&c__1, "ZSTEDC(V)", (ftnlen)9);
01818 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01819 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01820 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01821 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01822 e_wsfe();
01823 *info = abs(iinfo);
01824 if (iinfo < 0) {
01825 return 0;
01826 } else {
01827 result[24] = ulpinv;
01828 goto L280;
01829 }
01830 }
01831
01832
01833
01834 zstt21_(&n, &c__0, &sd[1], &se[1], &d1[1], dumma, &z__[z_offset],
01835 ldu, &work[1], &rwork[1], &result[24]);
01836
01837
01838
01839
01840
01841 dcopy_(&n, &sd[1], &c__1, &d2[1], &c__1);
01842 if (n > 0) {
01843 i__3 = n - 1;
01844 dcopy_(&i__3, &se[1], &c__1, &rwork[inde], &c__1);
01845 }
01846 zlaset_("Full", &n, &n, &c_b1, &c_b2, &z__[z_offset], ldu);
01847
01848 ntest = 26;
01849 zstedc_("N", &n, &d2[1], &rwork[inde], &z__[z_offset], ldu, &work[
01850 1], &lwedc, &rwork[indrwk], &lrwedc, &iwork[1], &liwedc, &
01851 iinfo);
01852 if (iinfo != 0) {
01853 io___80.ciunit = *nounit;
01854 s_wsfe(&io___80);
01855 do_fio(&c__1, "ZSTEDC(N)", (ftnlen)9);
01856 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01857 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01858 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01859 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01860 e_wsfe();
01861 *info = abs(iinfo);
01862 if (iinfo < 0) {
01863 return 0;
01864 } else {
01865 result[26] = ulpinv;
01866 goto L280;
01867 }
01868 }
01869
01870
01871
01872 temp1 = 0.;
01873 temp2 = 0.;
01874
01875 i__3 = n;
01876 for (j = 1; j <= i__3; ++j) {
01877
01878 d__3 = temp1, d__4 = (d__1 = d1[j], abs(d__1)), d__3 = max(
01879 d__3,d__4), d__4 = (d__2 = d2[j], abs(d__2));
01880 temp1 = max(d__3,d__4);
01881
01882 d__2 = temp2, d__3 = (d__1 = d1[j] - d2[j], abs(d__1));
01883 temp2 = max(d__2,d__3);
01884
01885 }
01886
01887
01888 d__1 = unfl, d__2 = ulp * max(temp1,temp2);
01889 result[26] = temp2 / max(d__1,d__2);
01890
01891
01892
01893 if (ilaenv_(&c__10, "ZSTEMR", "VA", &c__1, &c__0, &c__0, &c__0) == 1 && ilaenv_(&c__11, "ZSTEMR",
01894 "VA", &c__1, &c__0, &c__0, &c__0) ==
01895 1) {
01896
01897
01898
01899
01900
01901
01902 vl = 0.;
01903 vu = 0.;
01904 il = 0;
01905 iu = 0;
01906 if (FALSE_) {
01907 ntest = 27;
01908 abstol = unfl + unfl;
01909 i__3 = *lwork - (n << 1);
01910 zstemr_("V", "A", &n, &sd[1], &se[1], &vl, &vu, &il, &iu,
01911 &m, &wr[1], &z__[z_offset], ldu, &n, &iwork[1], &
01912 tryrac, &rwork[1], lrwork, &iwork[(n << 1) + 1], &
01913 i__3, &iinfo);
01914 if (iinfo != 0) {
01915 io___81.ciunit = *nounit;
01916 s_wsfe(&io___81);
01917 do_fio(&c__1, "ZSTEMR(V,A,rel)", (ftnlen)15);
01918 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer))
01919 ;
01920 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01921 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer))
01922 ;
01923 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
01924 integer));
01925 e_wsfe();
01926 *info = abs(iinfo);
01927 if (iinfo < 0) {
01928 return 0;
01929 } else {
01930 result[27] = ulpinv;
01931 goto L270;
01932 }
01933 }
01934
01935
01936
01937 temp2 = (n * 2. - 1.) * 2. * ulp * 3. / .0625;
01938
01939 temp1 = 0.;
01940 i__3 = n;
01941 for (j = 1; j <= i__3; ++j) {
01942
01943 d__3 = temp1, d__4 = (d__2 = d4[j] - wr[n - j + 1],
01944 abs(d__2)) / (abstol + (d__1 = d4[j], abs(
01945 d__1)));
01946 temp1 = max(d__3,d__4);
01947
01948 }
01949
01950 result[27] = temp1 / temp2;
01951
01952 il = (n - 1) * (integer) dlarnd_(&c__1, iseed2) + 1;
01953 iu = (n - 1) * (integer) dlarnd_(&c__1, iseed2) + 1;
01954 if (iu < il) {
01955 itemp = iu;
01956 iu = il;
01957 il = itemp;
01958 }
01959
01960 if (FALSE_) {
01961 ntest = 28;
01962 abstol = unfl + unfl;
01963 i__3 = *lwork - (n << 1);
01964 zstemr_("V", "I", &n, &sd[1], &se[1], &vl, &vu, &il, &
01965 iu, &m, &wr[1], &z__[z_offset], ldu, &n, &
01966 iwork[1], &tryrac, &rwork[1], lrwork, &iwork[(
01967 n << 1) + 1], &i__3, &iinfo);
01968
01969 if (iinfo != 0) {
01970 io___82.ciunit = *nounit;
01971 s_wsfe(&io___82);
01972 do_fio(&c__1, "ZSTEMR(V,I,rel)", (ftnlen)15);
01973 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(
01974 integer));
01975 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer))
01976 ;
01977 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(
01978 integer));
01979 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
01980 integer));
01981 e_wsfe();
01982 *info = abs(iinfo);
01983 if (iinfo < 0) {
01984 return 0;
01985 } else {
01986 result[28] = ulpinv;
01987 goto L270;
01988 }
01989 }
01990
01991
01992
01993
01994 temp2 = (n * 2. - 1.) * 2. * ulp * 3. / .0625;
01995
01996 temp1 = 0.;
01997 i__3 = iu;
01998 for (j = il; j <= i__3; ++j) {
01999
02000 d__3 = temp1, d__4 = (d__2 = wr[j - il + 1] - d4[
02001 n - j + 1], abs(d__2)) / (abstol + (d__1 =
02002 wr[j - il + 1], abs(d__1)));
02003 temp1 = max(d__3,d__4);
02004
02005 }
02006
02007 result[28] = temp1 / temp2;
02008 } else {
02009 result[28] = 0.;
02010 }
02011 } else {
02012 result[27] = 0.;
02013 result[28] = 0.;
02014 }
02015
02016
02017
02018
02019
02020 dcopy_(&n, &sd[1], &c__1, &d5[1], &c__1);
02021 if (n > 0) {
02022 i__3 = n - 1;
02023 dcopy_(&i__3, &se[1], &c__1, &rwork[1], &c__1);
02024 }
02025 zlaset_("Full", &n, &n, &c_b1, &c_b2, &z__[z_offset], ldu);
02026
02027 if (FALSE_) {
02028 ntest = 29;
02029 il = (n - 1) * (integer) dlarnd_(&c__1, iseed2) + 1;
02030 iu = (n - 1) * (integer) dlarnd_(&c__1, iseed2) + 1;
02031 if (iu < il) {
02032 itemp = iu;
02033 iu = il;
02034 il = itemp;
02035 }
02036 i__3 = *lrwork - n;
02037 i__4 = *liwork - (n << 1);
02038 zstemr_("V", "I", &n, &d5[1], &rwork[1], &vl, &vu, &il, &
02039 iu, &m, &d1[1], &z__[z_offset], ldu, &n, &iwork[1]
02040 , &tryrac, &rwork[n + 1], &i__3, &iwork[(n << 1)
02041 + 1], &i__4, &iinfo);
02042 if (iinfo != 0) {
02043 io___83.ciunit = *nounit;
02044 s_wsfe(&io___83);
02045 do_fio(&c__1, "ZSTEMR(V,I)", (ftnlen)11);
02046 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer))
02047 ;
02048 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
02049 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer))
02050 ;
02051 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
02052 integer));
02053 e_wsfe();
02054 *info = abs(iinfo);
02055 if (iinfo < 0) {
02056 return 0;
02057 } else {
02058 result[29] = ulpinv;
02059 goto L280;
02060 }
02061 }
02062
02063
02064
02065
02066
02067
02068
02069
02070 dcopy_(&n, &sd[1], &c__1, &d5[1], &c__1);
02071 if (n > 0) {
02072 i__3 = n - 1;
02073 dcopy_(&i__3, &se[1], &c__1, &rwork[1], &c__1);
02074 }
02075
02076 ntest = 31;
02077 i__3 = *lrwork - n;
02078 i__4 = *liwork - (n << 1);
02079 zstemr_("N", "I", &n, &d5[1], &rwork[1], &vl, &vu, &il, &
02080 iu, &m, &d2[1], &z__[z_offset], ldu, &n, &iwork[1]
02081 , &tryrac, &rwork[n + 1], &i__3, &iwork[(n << 1)
02082 + 1], &i__4, &iinfo);
02083 if (iinfo != 0) {
02084 io___84.ciunit = *nounit;
02085 s_wsfe(&io___84);
02086 do_fio(&c__1, "ZSTEMR(N,I)", (ftnlen)11);
02087 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer))
02088 ;
02089 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
02090 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer))
02091 ;
02092 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
02093 integer));
02094 e_wsfe();
02095 *info = abs(iinfo);
02096 if (iinfo < 0) {
02097 return 0;
02098 } else {
02099 result[31] = ulpinv;
02100 goto L280;
02101 }
02102 }
02103
02104
02105
02106 temp1 = 0.;
02107 temp2 = 0.;
02108
02109 i__3 = iu - il + 1;
02110 for (j = 1; j <= i__3; ++j) {
02111
02112 d__3 = temp1, d__4 = (d__1 = d1[j], abs(d__1)), d__3 =
02113 max(d__3,d__4), d__4 = (d__2 = d2[j], abs(
02114 d__2));
02115 temp1 = max(d__3,d__4);
02116
02117 d__2 = temp2, d__3 = (d__1 = d1[j] - d2[j], abs(d__1))
02118 ;
02119 temp2 = max(d__2,d__3);
02120
02121 }
02122
02123
02124 d__1 = unfl, d__2 = ulp * max(temp1,temp2);
02125 result[31] = temp2 / max(d__1,d__2);
02126
02127
02128
02129
02130
02131
02132 dcopy_(&n, &sd[1], &c__1, &d5[1], &c__1);
02133 if (n > 0) {
02134 i__3 = n - 1;
02135 dcopy_(&i__3, &se[1], &c__1, &rwork[1], &c__1);
02136 }
02137 zlaset_("Full", &n, &n, &c_b1, &c_b2, &z__[z_offset], ldu);
02138
02139 ntest = 32;
02140
02141 if (n > 0) {
02142 if (il != 1) {
02143
02144 d__1 = (d2[il] - d2[il - 1]) * .5, d__2 = ulp *
02145 anorm, d__1 = max(d__1,d__2), d__2 =
02146 rtunfl * 2.;
02147 vl = d2[il] - max(d__1,d__2);
02148 } else {
02149
02150 d__1 = (d2[n] - d2[1]) * .5, d__2 = ulp * anorm,
02151 d__1 = max(d__1,d__2), d__2 = rtunfl * 2.;
02152 vl = d2[1] - max(d__1,d__2);
02153 }
02154 if (iu != n) {
02155
02156 d__1 = (d2[iu + 1] - d2[iu]) * .5, d__2 = ulp *
02157 anorm, d__1 = max(d__1,d__2), d__2 =
02158 rtunfl * 2.;
02159 vu = d2[iu] + max(d__1,d__2);
02160 } else {
02161
02162 d__1 = (d2[n] - d2[1]) * .5, d__2 = ulp * anorm,
02163 d__1 = max(d__1,d__2), d__2 = rtunfl * 2.;
02164 vu = d2[n] + max(d__1,d__2);
02165 }
02166 } else {
02167 vl = 0.;
02168 vu = 1.;
02169 }
02170
02171 i__3 = *lrwork - n;
02172 i__4 = *liwork - (n << 1);
02173 zstemr_("V", "V", &n, &d5[1], &rwork[1], &vl, &vu, &il, &
02174 iu, &m, &d1[1], &z__[z_offset], ldu, &m, &iwork[1]
02175 , &tryrac, &rwork[n + 1], &i__3, &iwork[(n << 1)
02176 + 1], &i__4, &iinfo);
02177 if (iinfo != 0) {
02178 io___85.ciunit = *nounit;
02179 s_wsfe(&io___85);
02180 do_fio(&c__1, "ZSTEMR(V,V)", (ftnlen)11);
02181 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer))
02182 ;
02183 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
02184 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer))
02185 ;
02186 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
02187 integer));
02188 e_wsfe();
02189 *info = abs(iinfo);
02190 if (iinfo < 0) {
02191 return 0;
02192 } else {
02193 result[32] = ulpinv;
02194 goto L280;
02195 }
02196 }
02197
02198
02199
02200 zstt22_(&n, &m, &c__0, &sd[1], &se[1], &d1[1], dumma, &
02201 z__[z_offset], ldu, &work[1], &m, &rwork[1], &
02202 result[32]);
02203
02204
02205
02206
02207
02208 dcopy_(&n, &sd[1], &c__1, &d5[1], &c__1);
02209 if (n > 0) {
02210 i__3 = n - 1;
02211 dcopy_(&i__3, &se[1], &c__1, &rwork[1], &c__1);
02212 }
02213
02214 ntest = 34;
02215 i__3 = *lrwork - n;
02216 i__4 = *liwork - (n << 1);
02217 zstemr_("N", "V", &n, &d5[1], &rwork[1], &vl, &vu, &il, &
02218 iu, &m, &d2[1], &z__[z_offset], ldu, &n, &iwork[1]
02219 , &tryrac, &rwork[n + 1], &i__3, &iwork[(n << 1)
02220 + 1], &i__4, &iinfo);
02221 if (iinfo != 0) {
02222 io___86.ciunit = *nounit;
02223 s_wsfe(&io___86);
02224 do_fio(&c__1, "ZSTEMR(N,V)", (ftnlen)11);
02225 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer))
02226 ;
02227 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
02228 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer))
02229 ;
02230 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
02231 integer));
02232 e_wsfe();
02233 *info = abs(iinfo);
02234 if (iinfo < 0) {
02235 return 0;
02236 } else {
02237 result[34] = ulpinv;
02238 goto L280;
02239 }
02240 }
02241
02242
02243
02244 temp1 = 0.;
02245 temp2 = 0.;
02246
02247 i__3 = iu - il + 1;
02248 for (j = 1; j <= i__3; ++j) {
02249
02250 d__3 = temp1, d__4 = (d__1 = d1[j], abs(d__1)), d__3 =
02251 max(d__3,d__4), d__4 = (d__2 = d2[j], abs(
02252 d__2));
02253 temp1 = max(d__3,d__4);
02254
02255 d__2 = temp2, d__3 = (d__1 = d1[j] - d2[j], abs(d__1))
02256 ;
02257 temp2 = max(d__2,d__3);
02258
02259 }
02260
02261
02262 d__1 = unfl, d__2 = ulp * max(temp1,temp2);
02263 result[34] = temp2 / max(d__1,d__2);
02264 } else {
02265 result[29] = 0.;
02266 result[30] = 0.;
02267 result[31] = 0.;
02268 result[32] = 0.;
02269 result[33] = 0.;
02270 result[34] = 0.;
02271 }
02272
02273
02274
02275
02276
02277
02278 dcopy_(&n, &sd[1], &c__1, &d5[1], &c__1);
02279 if (n > 0) {
02280 i__3 = n - 1;
02281 dcopy_(&i__3, &se[1], &c__1, &rwork[1], &c__1);
02282 }
02283
02284 ntest = 35;
02285
02286 i__3 = *lrwork - n;
02287 i__4 = *liwork - (n << 1);
02288 zstemr_("V", "A", &n, &d5[1], &rwork[1], &vl, &vu, &il, &iu, &
02289 m, &d1[1], &z__[z_offset], ldu, &n, &iwork[1], &
02290 tryrac, &rwork[n + 1], &i__3, &iwork[(n << 1) + 1], &
02291 i__4, &iinfo);
02292 if (iinfo != 0) {
02293 io___87.ciunit = *nounit;
02294 s_wsfe(&io___87);
02295 do_fio(&c__1, "ZSTEMR(V,A)", (ftnlen)11);
02296 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
02297 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
02298 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
02299 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer))
02300 ;
02301 e_wsfe();
02302 *info = abs(iinfo);
02303 if (iinfo < 0) {
02304 return 0;
02305 } else {
02306 result[35] = ulpinv;
02307 goto L280;
02308 }
02309 }
02310
02311
02312
02313 zstt22_(&n, &m, &c__0, &sd[1], &se[1], &d1[1], dumma, &z__[
02314 z_offset], ldu, &work[1], &m, &rwork[1], &result[35]);
02315
02316
02317
02318
02319
02320 dcopy_(&n, &sd[1], &c__1, &d5[1], &c__1);
02321 if (n > 0) {
02322 i__3 = n - 1;
02323 dcopy_(&i__3, &se[1], &c__1, &rwork[1], &c__1);
02324 }
02325
02326 ntest = 37;
02327 i__3 = *lrwork - n;
02328 i__4 = *liwork - (n << 1);
02329 zstemr_("N", "A", &n, &d5[1], &rwork[1], &vl, &vu, &il, &iu, &
02330 m, &d2[1], &z__[z_offset], ldu, &n, &iwork[1], &
02331 tryrac, &rwork[n + 1], &i__3, &iwork[(n << 1) + 1], &
02332 i__4, &iinfo);
02333 if (iinfo != 0) {
02334 io___88.ciunit = *nounit;
02335 s_wsfe(&io___88);
02336 do_fio(&c__1, "ZSTEMR(N,A)", (ftnlen)11);
02337 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
02338 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
02339 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
02340 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer))
02341 ;
02342 e_wsfe();
02343 *info = abs(iinfo);
02344 if (iinfo < 0) {
02345 return 0;
02346 } else {
02347 result[37] = ulpinv;
02348 goto L280;
02349 }
02350 }
02351
02352
02353
02354 temp1 = 0.;
02355 temp2 = 0.;
02356
02357 i__3 = n;
02358 for (j = 1; j <= i__3; ++j) {
02359
02360 d__3 = temp1, d__4 = (d__1 = d1[j], abs(d__1)), d__3 =
02361 max(d__3,d__4), d__4 = (d__2 = d2[j], abs(d__2));
02362 temp1 = max(d__3,d__4);
02363
02364 d__2 = temp2, d__3 = (d__1 = d1[j] - d2[j], abs(d__1));
02365 temp2 = max(d__2,d__3);
02366
02367 }
02368
02369
02370 d__1 = unfl, d__2 = ulp * max(temp1,temp2);
02371 result[37] = temp2 / max(d__1,d__2);
02372 }
02373 L270:
02374 L280:
02375 ntestt += ntest;
02376
02377
02378
02379
02380
02381
02382 i__3 = ntest;
02383 for (jr = 1; jr <= i__3; ++jr) {
02384 if (result[jr] >= *thresh) {
02385
02386
02387
02388
02389 if (nerrs == 0) {
02390 io___89.ciunit = *nounit;
02391 s_wsfe(&io___89);
02392 do_fio(&c__1, "ZST", (ftnlen)3);
02393 e_wsfe();
02394 io___90.ciunit = *nounit;
02395 s_wsfe(&io___90);
02396 e_wsfe();
02397 io___91.ciunit = *nounit;
02398 s_wsfe(&io___91);
02399 e_wsfe();
02400 io___92.ciunit = *nounit;
02401 s_wsfe(&io___92);
02402 do_fio(&c__1, "Hermitian", (ftnlen)9);
02403 e_wsfe();
02404 io___93.ciunit = *nounit;
02405 s_wsfe(&io___93);
02406 e_wsfe();
02407
02408
02409
02410 io___94.ciunit = *nounit;
02411 s_wsfe(&io___94);
02412 e_wsfe();
02413 }
02414 ++nerrs;
02415 if (result[jr] < 1e4) {
02416 io___95.ciunit = *nounit;
02417 s_wsfe(&io___95);
02418 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
02419 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer))
02420 ;
02421 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
02422 integer));
02423 do_fio(&c__1, (char *)&jr, (ftnlen)sizeof(integer));
02424 do_fio(&c__1, (char *)&result[jr], (ftnlen)sizeof(
02425 doublereal));
02426 e_wsfe();
02427 } else {
02428 io___96.ciunit = *nounit;
02429 s_wsfe(&io___96);
02430 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
02431 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer))
02432 ;
02433 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
02434 integer));
02435 do_fio(&c__1, (char *)&jr, (ftnlen)sizeof(integer));
02436 do_fio(&c__1, (char *)&result[jr], (ftnlen)sizeof(
02437 doublereal));
02438 e_wsfe();
02439 }
02440 }
02441
02442 }
02443 L300:
02444 ;
02445 }
02446
02447 }
02448
02449
02450
02451 dlasum_("ZST", nounit, &nerrs, &ntestt);
02452 return 0;
02453
02454
02455
02456
02457
02458
02459
02460
02461
02462
02463
02464 }