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 integer c__1 = 1;
00019 static integer c_n1 = -1;
00020 static integer c__2 = 2;
00021 static doublereal c_b25 = 0.;
00022 static integer c__0 = 0;
00023 static integer c__6 = 6;
00024 static doublereal c_b39 = 1.;
00025 static integer c__4 = 4;
00026 static integer c__3 = 3;
00027 static integer c__10 = 10;
00028 static integer c__11 = 11;
00029
00030 int dchkst_(integer *nsizes, integer *nn, integer *ntypes,
00031 logical *dotype, integer *iseed, doublereal *thresh, integer *nounit,
00032 doublereal *a, integer *lda, doublereal *ap, doublereal *sd,
00033 doublereal *se, doublereal *d1, doublereal *d2, doublereal *d3,
00034 doublereal *d4, doublereal *d5, doublereal *wa1, doublereal *wa2,
00035 doublereal *wa3, doublereal *wr, doublereal *u, integer *ldu,
00036 doublereal *v, doublereal *vp, doublereal *tau, doublereal *z__,
00037 doublereal *work, integer *lwork, integer *iwork, integer *liwork,
00038 doublereal *result, integer *info)
00039 {
00040
00041
00042 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 };
00043 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 };
00044 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 };
00045
00046
00047 static char fmt_9999[] = "(\002 DCHKST: \002,a,\002 returned INFO=\002,i"
00048 "6,\002.\002,/9x,\002N=\002,i6,\002, JTYPE=\002,i6,\002, ISEED="
00049 "(\002,3(i5,\002,\002),i5,\002)\002)";
00050 static char fmt_9998[] = "(/1x,a3,\002 -- Real Symmetric eigenvalue prob"
00051 "lem\002)";
00052 static char fmt_9997[] = "(\002 Matrix types (see DCHKST for details):"
00053 " \002)";
00054 static char fmt_9996[] = "(/\002 Special Matrices:\002,/\002 1=Zero mat"
00055 "rix. \002,\002 5=Diagonal: clustered ent"
00056 "ries.\002,/\002 2=Identity matrix. \002,\002"
00057 " 6=Diagonal: large, evenly spaced.\002,/\002 3=Diagonal: evenl"
00058 "y spaced entries. \002,\002 7=Diagonal: small, evenly spaced."
00059 "\002,/\002 4=Diagonal: geometr. spaced entries.\002)";
00060 static char fmt_9995[] = "(\002 Dense \002,a,\002 Matrices:\002,/\002 8"
00061 "=Evenly spaced eigenvals. \002,\002 12=Small, evenly "
00062 "spaced eigenvals.\002,/\002 9=Geometrically spaced eigenvals. "
00063 " \002,\002 13=Matrix with random O(1) entries.\002,/\002 10=Cl"
00064 "ustered eigenvalues. \002,\002 14=Matrix with large"
00065 " random entries.\002,/\002 11=Large, evenly spaced eigenvals. "
00066 " \002,\002 15=Matrix with small random entries.\002)";
00067 static char fmt_9994[] = "(\002 16=Positive definite, evenly spaced eige"
00068 "nvalues\002,/\002 17=Positive definite, geometrically spaced eig"
00069 "envlaues\002,/\002 18=Positive definite, clustered eigenvalue"
00070 "s\002,/\002 19=Positive definite, small evenly spaced eigenvalues"
00071 "\002,/\002 20=Positive definite, large evenly spaced eigenvalue"
00072 "s\002,/\002 21=Diagonally dominant tridiagonal, geometrically"
00073 "\002,\002 spaced eigenvalues\002)";
00074 static char fmt_9988[] = "(/\002Test performed: see DCHKST for details"
00075 ".\002,/)";
00076 static char fmt_9990[] = "(\002 N=\002,i5,\002, seed=\002,4(i4,\002,\002"
00077 "),\002 type \002,i2,\002, test(\002,i2,\002)=\002,g10.3)";
00078
00079
00080 integer a_dim1, a_offset, u_dim1, u_offset, v_dim1, v_offset, z_dim1,
00081 z_offset, i__1, i__2, i__3, i__4;
00082 doublereal d__1, d__2, d__3, d__4;
00083
00084
00085 double log(doublereal), sqrt(doublereal);
00086 integer pow_ii(integer *, integer *), s_wsfe(cilist *), do_fio(integer *,
00087 char *, ftnlen), e_wsfe(void);
00088
00089
00090 integer i__, j, m, n, m2, m3, jc, il, jr, iu;
00091 doublereal vl, vu;
00092 integer nap, lgn;
00093 doublereal ulp, cond;
00094 integer nmax;
00095 doublereal unfl, ovfl, temp1, temp2, temp3, temp4;
00096 extern doublereal dsxt1_(integer *, doublereal *, integer *, doublereal *,
00097 integer *, doublereal *, doublereal *, doublereal *);
00098 logical badnn;
00099 integer imode, lwedc;
00100 doublereal dumma[1];
00101 integer iinfo;
00102 doublereal aninv, anorm;
00103 extern int dspt21_(integer *, char *, integer *, integer
00104 *, doublereal *, doublereal *, doublereal *, doublereal *,
00105 integer *, doublereal *, doublereal *, doublereal *, doublereal *);
00106 integer itemp;
00107 extern int dcopy_(integer *, doublereal *, integer *,
00108 doublereal *, integer *), dstt21_(integer *, integer *,
00109 doublereal *, doublereal *, doublereal *, doublereal *,
00110 doublereal *, integer *, doublereal *, doublereal *);
00111 integer nmats;
00112 extern int dstt22_(integer *, integer *, integer *,
00113 doublereal *, doublereal *, doublereal *, doublereal *,
00114 doublereal *, integer *, doublereal *, integer *, doublereal *);
00115 integer jsize;
00116 extern int dsyt21_(integer *, char *, integer *, integer
00117 *, doublereal *, integer *, doublereal *, doublereal *,
00118 doublereal *, integer *, doublereal *, integer *, doublereal *,
00119 doublereal *, doublereal *);
00120 integer nerrs, itype, jtype, ntest, iseed2[4], log2ui;
00121 extern int dlabad_(doublereal *, doublereal *);
00122 extern doublereal dlamch_(char *), dlarnd_(integer *, integer *);
00123 extern int dstedc_(char *, integer *, doublereal *,
00124 doublereal *, doublereal *, integer *, doublereal *, integer *,
00125 integer *, integer *, integer *);
00126 integer liwedc, nblock;
00127 extern int dstech_(integer *, doublereal *, doublereal *,
00128 doublereal *, doublereal *, doublereal *, integer *);
00129 integer idumma[1];
00130 extern int dlacpy_(char *, integer *, integer *,
00131 doublereal *, integer *, doublereal *, integer *);
00132 integer ioldsd[4];
00133 extern integer ilaenv_(integer *, char *, char *, integer *, integer *,
00134 integer *, integer *);
00135 extern int dlaset_(char *, integer *, integer *,
00136 doublereal *, doublereal *, doublereal *, integer *),
00137 dlatmr_(integer *, integer *, char *, integer *, char *,
00138 doublereal *, integer *, doublereal *, doublereal *, char *, char
00139 *, doublereal *, integer *, doublereal *, doublereal *, integer *,
00140 doublereal *, char *, integer *, integer *, integer *,
00141 doublereal *, doublereal *, char *, doublereal *, integer *,
00142 integer *, integer *);
00143 doublereal abstol;
00144 extern int dlasum_(char *, integer *, integer *, integer
00145 *), dlatms_(integer *, integer *, char *, integer *, char
00146 *, doublereal *, integer *, doublereal *, doublereal *, integer *,
00147 integer *, char *, doublereal *, integer *, doublereal *,
00148 integer *), dstein_(integer *, doublereal
00149 *, doublereal *, integer *, doublereal *, integer *, integer *,
00150 doublereal *, integer *, doublereal *, integer *, integer *,
00151 integer *), dsterf_(integer *, doublereal *, doublereal *,
00152 integer *), xerbla_(char *, integer *), dstebz_(char *,
00153 char *, integer *, doublereal *, doublereal *, integer *, integer
00154 *, doublereal *, doublereal *, doublereal *, integer *, integer *,
00155 doublereal *, integer *, integer *, doublereal *, integer *,
00156 integer *), dstemr_(char *, char *, integer *,
00157 doublereal *, doublereal *, doublereal *, doublereal *, integer *,
00158 integer *, integer *, doublereal *, doublereal *, integer *,
00159 integer *, integer *, logical *, doublereal *, integer *, integer
00160 *, integer *, integer *), dopgtr_(char *, integer
00161 *, doublereal *, doublereal *, doublereal *, integer *,
00162 doublereal *, integer *), dpteqr_(char *, integer *,
00163 doublereal *, doublereal *, doublereal *, integer *, doublereal *,
00164 integer *), dorgtr_(char *, integer *, doublereal *,
00165 integer *, doublereal *, doublereal *, integer *, integer *), dsptrd_(char *, integer *, doublereal *, doublereal *,
00166 doublereal *, doublereal *, integer *), dsteqr_(char *,
00167 integer *, doublereal *, doublereal *, doublereal *, integer *,
00168 doublereal *, integer *);
00169 logical tryrac;
00170 integer nsplit;
00171 doublereal rtunfl, rtovfl, ulpinv;
00172 extern int dsytrd_(char *, integer *, doublereal *,
00173 integer *, doublereal *, doublereal *, doublereal *, doublereal *,
00174 integer *, integer *);
00175 integer mtypes, ntestt;
00176
00177
00178 static cilist io___40 = { 0, 0, 0, fmt_9999, 0 };
00179 static cilist io___41 = { 0, 0, 0, fmt_9999, 0 };
00180 static cilist io___42 = { 0, 0, 0, fmt_9999, 0 };
00181 static cilist io___43 = { 0, 0, 0, fmt_9999, 0 };
00182 static cilist io___44 = { 0, 0, 0, fmt_9999, 0 };
00183 static cilist io___46 = { 0, 0, 0, fmt_9999, 0 };
00184 static cilist io___47 = { 0, 0, 0, fmt_9999, 0 };
00185 static cilist io___48 = { 0, 0, 0, fmt_9999, 0 };
00186 static cilist io___49 = { 0, 0, 0, fmt_9999, 0 };
00187 static cilist io___50 = { 0, 0, 0, fmt_9999, 0 };
00188 static cilist io___51 = { 0, 0, 0, fmt_9999, 0 };
00189 static cilist io___52 = { 0, 0, 0, fmt_9999, 0 };
00190 static cilist io___57 = { 0, 0, 0, fmt_9999, 0 };
00191 static cilist io___58 = { 0, 0, 0, fmt_9999, 0 };
00192 static cilist io___66 = { 0, 0, 0, fmt_9999, 0 };
00193 static cilist io___67 = { 0, 0, 0, fmt_9999, 0 };
00194 static cilist io___70 = { 0, 0, 0, fmt_9999, 0 };
00195 static cilist io___72 = { 0, 0, 0, fmt_9999, 0 };
00196 static cilist io___73 = { 0, 0, 0, fmt_9999, 0 };
00197 static cilist io___74 = { 0, 0, 0, fmt_9999, 0 };
00198 static cilist io___75 = { 0, 0, 0, fmt_9999, 0 };
00199 static cilist io___76 = { 0, 0, 0, fmt_9999, 0 };
00200 static cilist io___77 = { 0, 0, 0, fmt_9999, 0 };
00201 static cilist io___78 = { 0, 0, 0, fmt_9999, 0 };
00202 static cilist io___79 = { 0, 0, 0, fmt_9999, 0 };
00203 static cilist io___80 = { 0, 0, 0, fmt_9999, 0 };
00204 static cilist io___81 = { 0, 0, 0, fmt_9999, 0 };
00205 static cilist io___82 = { 0, 0, 0, fmt_9999, 0 };
00206 static cilist io___83 = { 0, 0, 0, fmt_9999, 0 };
00207 static cilist io___84 = { 0, 0, 0, fmt_9999, 0 };
00208 static cilist io___85 = { 0, 0, 0, fmt_9999, 0 };
00209 static cilist io___86 = { 0, 0, 0, fmt_9998, 0 };
00210 static cilist io___87 = { 0, 0, 0, fmt_9997, 0 };
00211 static cilist io___88 = { 0, 0, 0, fmt_9996, 0 };
00212 static cilist io___89 = { 0, 0, 0, fmt_9995, 0 };
00213 static cilist io___90 = { 0, 0, 0, fmt_9994, 0 };
00214 static cilist io___91 = { 0, 0, 0, fmt_9988, 0 };
00215 static cilist io___92 = { 0, 0, 0, fmt_9990, 0 };
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
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 --nn;
00644 --dotype;
00645 --iseed;
00646 a_dim1 = *lda;
00647 a_offset = 1 + a_dim1;
00648 a -= a_offset;
00649 --ap;
00650 --sd;
00651 --se;
00652 --d1;
00653 --d2;
00654 --d3;
00655 --d4;
00656 --d5;
00657 --wa1;
00658 --wa2;
00659 --wa3;
00660 --wr;
00661 z_dim1 = *ldu;
00662 z_offset = 1 + z_dim1;
00663 z__ -= z_offset;
00664 v_dim1 = *ldu;
00665 v_offset = 1 + v_dim1;
00666 v -= v_offset;
00667 u_dim1 = *ldu;
00668 u_offset = 1 + u_dim1;
00669 u -= u_offset;
00670 --vp;
00671 --tau;
00672 --work;
00673 --iwork;
00674 --result;
00675
00676
00677
00678
00679
00680
00681 idumma[0] = 1;
00682
00683
00684
00685 ntestt = 0;
00686 *info = 0;
00687
00688
00689
00690 badnn = FALSE_;
00691 tryrac = TRUE_;
00692 nmax = 1;
00693 i__1 = *nsizes;
00694 for (j = 1; j <= i__1; ++j) {
00695
00696 i__2 = nmax, i__3 = nn[j];
00697 nmax = max(i__2,i__3);
00698 if (nn[j] < 0) {
00699 badnn = TRUE_;
00700 }
00701
00702 }
00703
00704 nblock = ilaenv_(&c__1, "DSYTRD", "L", &nmax, &c_n1, &c_n1, &c_n1);
00705
00706 i__1 = nmax, i__2 = max(1,nblock);
00707 nblock = min(i__1,i__2);
00708
00709
00710
00711 if (*nsizes < 0) {
00712 *info = -1;
00713 } else if (badnn) {
00714 *info = -2;
00715 } else if (*ntypes < 0) {
00716 *info = -3;
00717 } else if (*lda < nmax) {
00718 *info = -9;
00719 } else if (*ldu < nmax) {
00720 *info = -23;
00721 } else {
00722
00723 i__1 = max(2,nmax);
00724 if (i__1 * i__1 << 1 > *lwork) {
00725 *info = -29;
00726 }
00727 }
00728
00729 if (*info != 0) {
00730 i__1 = -(*info);
00731 xerbla_("DCHKST", &i__1);
00732 return 0;
00733 }
00734
00735
00736
00737 if (*nsizes == 0 || *ntypes == 0) {
00738 return 0;
00739 }
00740
00741
00742
00743 unfl = dlamch_("Safe minimum");
00744 ovfl = 1. / unfl;
00745 dlabad_(&unfl, &ovfl);
00746 ulp = dlamch_("Epsilon") * dlamch_("Base");
00747 ulpinv = 1. / ulp;
00748 log2ui = (integer) (log(ulpinv) / log(2.));
00749 rtunfl = sqrt(unfl);
00750 rtovfl = sqrt(ovfl);
00751
00752
00753
00754 for (i__ = 1; i__ <= 4; ++i__) {
00755 iseed2[i__ - 1] = iseed[i__];
00756
00757 }
00758 nerrs = 0;
00759 nmats = 0;
00760
00761 i__1 = *nsizes;
00762 for (jsize = 1; jsize <= i__1; ++jsize) {
00763 n = nn[jsize];
00764 if (n > 0) {
00765 lgn = (integer) (log((doublereal) n) / log(2.));
00766 if (pow_ii(&c__2, &lgn) < n) {
00767 ++lgn;
00768 }
00769 if (pow_ii(&c__2, &lgn) < n) {
00770 ++lgn;
00771 }
00772
00773 i__2 = n;
00774 lwedc = (n << 2) + 1 + (n << 1) * lgn + i__2 * i__2 * 3;
00775 liwedc = n * 6 + 6 + n * 5 * lgn;
00776 } else {
00777 lwedc = 8;
00778 liwedc = 12;
00779 }
00780 nap = n * (n + 1) / 2;
00781 aninv = 1. / (doublereal) max(1,n);
00782
00783 if (*nsizes != 1) {
00784 mtypes = min(21,*ntypes);
00785 } else {
00786 mtypes = min(22,*ntypes);
00787 }
00788
00789 i__2 = mtypes;
00790 for (jtype = 1; jtype <= i__2; ++jtype) {
00791 if (! dotype[jtype]) {
00792 goto L300;
00793 }
00794 ++nmats;
00795 ntest = 0;
00796
00797 for (j = 1; j <= 4; ++j) {
00798 ioldsd[j - 1] = iseed[j];
00799
00800 }
00801
00802
00803
00804
00805
00806
00807
00808
00809
00810
00811
00812
00813
00814
00815
00816
00817
00818 if (mtypes > 21) {
00819 goto L100;
00820 }
00821
00822 itype = ktype[jtype - 1];
00823 imode = kmode[jtype - 1];
00824
00825
00826
00827 switch (kmagn[jtype - 1]) {
00828 case 1: goto L40;
00829 case 2: goto L50;
00830 case 3: goto L60;
00831 }
00832
00833 L40:
00834 anorm = 1.;
00835 goto L70;
00836
00837 L50:
00838 anorm = rtovfl * ulp * aninv;
00839 goto L70;
00840
00841 L60:
00842 anorm = rtunfl * n * ulpinv;
00843 goto L70;
00844
00845 L70:
00846
00847 dlaset_("Full", lda, &n, &c_b25, &c_b25, &a[a_offset], lda);
00848 iinfo = 0;
00849 if (jtype <= 15) {
00850 cond = ulpinv;
00851 } else {
00852 cond = ulpinv * aninv / 10.;
00853 }
00854
00855
00856
00857
00858
00859 if (itype == 1) {
00860 iinfo = 0;
00861
00862 } else if (itype == 2) {
00863
00864
00865
00866 i__3 = n;
00867 for (jc = 1; jc <= i__3; ++jc) {
00868 a[jc + jc * a_dim1] = anorm;
00869
00870 }
00871
00872 } else if (itype == 4) {
00873
00874
00875
00876 dlatms_(&n, &n, "S", &iseed[1], "S", &work[1], &imode, &cond,
00877 &anorm, &c__0, &c__0, "N", &a[a_offset], lda, &work[n
00878 + 1], &iinfo);
00879
00880
00881 } else if (itype == 5) {
00882
00883
00884
00885 dlatms_(&n, &n, "S", &iseed[1], "S", &work[1], &imode, &cond,
00886 &anorm, &n, &n, "N", &a[a_offset], lda, &work[n + 1],
00887 &iinfo);
00888
00889 } else if (itype == 7) {
00890
00891
00892
00893 dlatmr_(&n, &n, "S", &iseed[1], "S", &work[1], &c__6, &c_b39,
00894 &c_b39, "T", "N", &work[n + 1], &c__1, &c_b39, &work[(
00895 n << 1) + 1], &c__1, &c_b39, "N", idumma, &c__0, &
00896 c__0, &c_b25, &anorm, "NO", &a[a_offset], lda, &iwork[
00897 1], &iinfo);
00898
00899 } else if (itype == 8) {
00900
00901
00902
00903 dlatmr_(&n, &n, "S", &iseed[1], "S", &work[1], &c__6, &c_b39,
00904 &c_b39, "T", "N", &work[n + 1], &c__1, &c_b39, &work[(
00905 n << 1) + 1], &c__1, &c_b39, "N", idumma, &n, &n, &
00906 c_b25, &anorm, "NO", &a[a_offset], lda, &iwork[1], &
00907 iinfo);
00908
00909 } else if (itype == 9) {
00910
00911
00912
00913 dlatms_(&n, &n, "S", &iseed[1], "P", &work[1], &imode, &cond,
00914 &anorm, &n, &n, "N", &a[a_offset], lda, &work[n + 1],
00915 &iinfo);
00916
00917 } else if (itype == 10) {
00918
00919
00920
00921 dlatms_(&n, &n, "S", &iseed[1], "P", &work[1], &imode, &cond,
00922 &anorm, &c__1, &c__1, "N", &a[a_offset], lda, &work[n
00923 + 1], &iinfo);
00924 i__3 = n;
00925 for (i__ = 2; i__ <= i__3; ++i__) {
00926 temp1 = (d__1 = a[i__ - 1 + i__ * a_dim1], abs(d__1)) /
00927 sqrt((d__2 = a[i__ - 1 + (i__ - 1) * a_dim1] * a[
00928 i__ + i__ * a_dim1], abs(d__2)));
00929 if (temp1 > .5) {
00930 a[i__ - 1 + i__ * a_dim1] = sqrt((d__1 = a[i__ - 1 + (
00931 i__ - 1) * a_dim1] * a[i__ + i__ * a_dim1],
00932 abs(d__1))) * .5;
00933 a[i__ + (i__ - 1) * a_dim1] = a[i__ - 1 + i__ *
00934 a_dim1];
00935 }
00936
00937 }
00938
00939 } else {
00940
00941 iinfo = 1;
00942 }
00943
00944 if (iinfo != 0) {
00945 io___40.ciunit = *nounit;
00946 s_wsfe(&io___40);
00947 do_fio(&c__1, "Generator", (ftnlen)9);
00948 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00949 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00950 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
00951 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
00952 e_wsfe();
00953 *info = abs(iinfo);
00954 return 0;
00955 }
00956
00957 L100:
00958
00959
00960
00961
00962 dlacpy_("U", &n, &n, &a[a_offset], lda, &v[v_offset], ldu);
00963
00964 ntest = 1;
00965 dsytrd_("U", &n, &v[v_offset], ldu, &sd[1], &se[1], &tau[1], &
00966 work[1], lwork, &iinfo);
00967
00968 if (iinfo != 0) {
00969 io___41.ciunit = *nounit;
00970 s_wsfe(&io___41);
00971 do_fio(&c__1, "DSYTRD(U)", (ftnlen)9);
00972 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00973 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00974 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
00975 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
00976 e_wsfe();
00977 *info = abs(iinfo);
00978 if (iinfo < 0) {
00979 return 0;
00980 } else {
00981 result[1] = ulpinv;
00982 goto L280;
00983 }
00984 }
00985
00986 dlacpy_("U", &n, &n, &v[v_offset], ldu, &u[u_offset], ldu);
00987
00988 ntest = 2;
00989 dorgtr_("U", &n, &u[u_offset], ldu, &tau[1], &work[1], lwork, &
00990 iinfo);
00991 if (iinfo != 0) {
00992 io___42.ciunit = *nounit;
00993 s_wsfe(&io___42);
00994 do_fio(&c__1, "DORGTR(U)", (ftnlen)9);
00995 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00996 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00997 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
00998 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
00999 e_wsfe();
01000 *info = abs(iinfo);
01001 if (iinfo < 0) {
01002 return 0;
01003 } else {
01004 result[2] = ulpinv;
01005 goto L280;
01006 }
01007 }
01008
01009
01010
01011 dsyt21_(&c__2, "Upper", &n, &c__1, &a[a_offset], lda, &sd[1], &se[
01012 1], &u[u_offset], ldu, &v[v_offset], ldu, &tau[1], &work[
01013 1], &result[1]);
01014 dsyt21_(&c__3, "Upper", &n, &c__1, &a[a_offset], lda, &sd[1], &se[
01015 1], &u[u_offset], ldu, &v[v_offset], ldu, &tau[1], &work[
01016 1], &result[2]);
01017
01018
01019
01020
01021 dlacpy_("L", &n, &n, &a[a_offset], lda, &v[v_offset], ldu);
01022
01023 ntest = 3;
01024 dsytrd_("L", &n, &v[v_offset], ldu, &sd[1], &se[1], &tau[1], &
01025 work[1], lwork, &iinfo);
01026
01027 if (iinfo != 0) {
01028 io___43.ciunit = *nounit;
01029 s_wsfe(&io___43);
01030 do_fio(&c__1, "DSYTRD(L)", (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[3] = ulpinv;
01041 goto L280;
01042 }
01043 }
01044
01045 dlacpy_("L", &n, &n, &v[v_offset], ldu, &u[u_offset], ldu);
01046
01047 ntest = 4;
01048 dorgtr_("L", &n, &u[u_offset], ldu, &tau[1], &work[1], lwork, &
01049 iinfo);
01050 if (iinfo != 0) {
01051 io___44.ciunit = *nounit;
01052 s_wsfe(&io___44);
01053 do_fio(&c__1, "DORGTR(L)", (ftnlen)9);
01054 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01055 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01056 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01057 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01058 e_wsfe();
01059 *info = abs(iinfo);
01060 if (iinfo < 0) {
01061 return 0;
01062 } else {
01063 result[4] = ulpinv;
01064 goto L280;
01065 }
01066 }
01067
01068 dsyt21_(&c__2, "Lower", &n, &c__1, &a[a_offset], lda, &sd[1], &se[
01069 1], &u[u_offset], ldu, &v[v_offset], ldu, &tau[1], &work[
01070 1], &result[3]);
01071 dsyt21_(&c__3, "Lower", &n, &c__1, &a[a_offset], lda, &sd[1], &se[
01072 1], &u[u_offset], ldu, &v[v_offset], ldu, &tau[1], &work[
01073 1], &result[4]);
01074
01075
01076
01077 i__ = 0;
01078 i__3 = n;
01079 for (jc = 1; jc <= i__3; ++jc) {
01080 i__4 = jc;
01081 for (jr = 1; jr <= i__4; ++jr) {
01082 ++i__;
01083 ap[i__] = a[jr + jc * a_dim1];
01084
01085 }
01086
01087 }
01088
01089
01090
01091 dcopy_(&nap, &ap[1], &c__1, &vp[1], &c__1);
01092
01093 ntest = 5;
01094 dsptrd_("U", &n, &vp[1], &sd[1], &se[1], &tau[1], &iinfo);
01095
01096 if (iinfo != 0) {
01097 io___46.ciunit = *nounit;
01098 s_wsfe(&io___46);
01099 do_fio(&c__1, "DSPTRD(U)", (ftnlen)9);
01100 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01101 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01102 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01103 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01104 e_wsfe();
01105 *info = abs(iinfo);
01106 if (iinfo < 0) {
01107 return 0;
01108 } else {
01109 result[5] = ulpinv;
01110 goto L280;
01111 }
01112 }
01113
01114 ntest = 6;
01115 dopgtr_("U", &n, &vp[1], &tau[1], &u[u_offset], ldu, &work[1], &
01116 iinfo);
01117 if (iinfo != 0) {
01118 io___47.ciunit = *nounit;
01119 s_wsfe(&io___47);
01120 do_fio(&c__1, "DOPGTR(U)", (ftnlen)9);
01121 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01122 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01123 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01124 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01125 e_wsfe();
01126 *info = abs(iinfo);
01127 if (iinfo < 0) {
01128 return 0;
01129 } else {
01130 result[6] = ulpinv;
01131 goto L280;
01132 }
01133 }
01134
01135
01136
01137 dspt21_(&c__2, "Upper", &n, &c__1, &ap[1], &sd[1], &se[1], &u[
01138 u_offset], ldu, &vp[1], &tau[1], &work[1], &result[5]);
01139 dspt21_(&c__3, "Upper", &n, &c__1, &ap[1], &sd[1], &se[1], &u[
01140 u_offset], ldu, &vp[1], &tau[1], &work[1], &result[6]);
01141
01142
01143
01144 i__ = 0;
01145 i__3 = n;
01146 for (jc = 1; jc <= i__3; ++jc) {
01147 i__4 = n;
01148 for (jr = jc; jr <= i__4; ++jr) {
01149 ++i__;
01150 ap[i__] = a[jr + jc * a_dim1];
01151
01152 }
01153
01154 }
01155
01156
01157
01158 dcopy_(&nap, &ap[1], &c__1, &vp[1], &c__1);
01159
01160 ntest = 7;
01161 dsptrd_("L", &n, &vp[1], &sd[1], &se[1], &tau[1], &iinfo);
01162
01163 if (iinfo != 0) {
01164 io___48.ciunit = *nounit;
01165 s_wsfe(&io___48);
01166 do_fio(&c__1, "DSPTRD(L)", (ftnlen)9);
01167 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01168 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01169 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01170 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01171 e_wsfe();
01172 *info = abs(iinfo);
01173 if (iinfo < 0) {
01174 return 0;
01175 } else {
01176 result[7] = ulpinv;
01177 goto L280;
01178 }
01179 }
01180
01181 ntest = 8;
01182 dopgtr_("L", &n, &vp[1], &tau[1], &u[u_offset], ldu, &work[1], &
01183 iinfo);
01184 if (iinfo != 0) {
01185 io___49.ciunit = *nounit;
01186 s_wsfe(&io___49);
01187 do_fio(&c__1, "DOPGTR(L)", (ftnlen)9);
01188 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01189 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01190 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01191 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01192 e_wsfe();
01193 *info = abs(iinfo);
01194 if (iinfo < 0) {
01195 return 0;
01196 } else {
01197 result[8] = ulpinv;
01198 goto L280;
01199 }
01200 }
01201
01202 dspt21_(&c__2, "Lower", &n, &c__1, &ap[1], &sd[1], &se[1], &u[
01203 u_offset], ldu, &vp[1], &tau[1], &work[1], &result[7]);
01204 dspt21_(&c__3, "Lower", &n, &c__1, &ap[1], &sd[1], &se[1], &u[
01205 u_offset], ldu, &vp[1], &tau[1], &work[1], &result[8]);
01206
01207
01208
01209
01210
01211 dcopy_(&n, &sd[1], &c__1, &d1[1], &c__1);
01212 if (n > 0) {
01213 i__3 = n - 1;
01214 dcopy_(&i__3, &se[1], &c__1, &work[1], &c__1);
01215 }
01216 dlaset_("Full", &n, &n, &c_b25, &c_b39, &z__[z_offset], ldu);
01217
01218 ntest = 9;
01219 dsteqr_("V", &n, &d1[1], &work[1], &z__[z_offset], ldu, &work[n +
01220 1], &iinfo);
01221 if (iinfo != 0) {
01222 io___50.ciunit = *nounit;
01223 s_wsfe(&io___50);
01224 do_fio(&c__1, "DSTEQR(V)", (ftnlen)9);
01225 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01226 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01227 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01228 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01229 e_wsfe();
01230 *info = abs(iinfo);
01231 if (iinfo < 0) {
01232 return 0;
01233 } else {
01234 result[9] = ulpinv;
01235 goto L280;
01236 }
01237 }
01238
01239
01240
01241 dcopy_(&n, &sd[1], &c__1, &d2[1], &c__1);
01242 if (n > 0) {
01243 i__3 = n - 1;
01244 dcopy_(&i__3, &se[1], &c__1, &work[1], &c__1);
01245 }
01246
01247 ntest = 11;
01248 dsteqr_("N", &n, &d2[1], &work[1], &work[n + 1], ldu, &work[n + 1]
01249 , &iinfo);
01250 if (iinfo != 0) {
01251 io___51.ciunit = *nounit;
01252 s_wsfe(&io___51);
01253 do_fio(&c__1, "DSTEQR(N)", (ftnlen)9);
01254 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01255 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01256 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01257 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01258 e_wsfe();
01259 *info = abs(iinfo);
01260 if (iinfo < 0) {
01261 return 0;
01262 } else {
01263 result[11] = ulpinv;
01264 goto L280;
01265 }
01266 }
01267
01268
01269
01270 dcopy_(&n, &sd[1], &c__1, &d3[1], &c__1);
01271 if (n > 0) {
01272 i__3 = n - 1;
01273 dcopy_(&i__3, &se[1], &c__1, &work[1], &c__1);
01274 }
01275
01276 ntest = 12;
01277 dsterf_(&n, &d3[1], &work[1], &iinfo);
01278 if (iinfo != 0) {
01279 io___52.ciunit = *nounit;
01280 s_wsfe(&io___52);
01281 do_fio(&c__1, "DSTERF", (ftnlen)6);
01282 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01283 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01284 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01285 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01286 e_wsfe();
01287 *info = abs(iinfo);
01288 if (iinfo < 0) {
01289 return 0;
01290 } else {
01291 result[12] = ulpinv;
01292 goto L280;
01293 }
01294 }
01295
01296
01297
01298 dstt21_(&n, &c__0, &sd[1], &se[1], &d1[1], dumma, &z__[z_offset],
01299 ldu, &work[1], &result[9]);
01300
01301
01302
01303 temp1 = 0.;
01304 temp2 = 0.;
01305 temp3 = 0.;
01306 temp4 = 0.;
01307
01308 i__3 = n;
01309 for (j = 1; j <= i__3; ++j) {
01310
01311 d__3 = temp1, d__4 = (d__1 = d1[j], abs(d__1)), d__3 = max(
01312 d__3,d__4), d__4 = (d__2 = d2[j], abs(d__2));
01313 temp1 = max(d__3,d__4);
01314
01315 d__2 = temp2, d__3 = (d__1 = d1[j] - d2[j], abs(d__1));
01316 temp2 = max(d__2,d__3);
01317
01318 d__3 = temp3, d__4 = (d__1 = d1[j], abs(d__1)), d__3 = max(
01319 d__3,d__4), d__4 = (d__2 = d3[j], abs(d__2));
01320 temp3 = max(d__3,d__4);
01321
01322 d__2 = temp4, d__3 = (d__1 = d1[j] - d3[j], abs(d__1));
01323 temp4 = max(d__2,d__3);
01324
01325 }
01326
01327
01328 d__1 = unfl, d__2 = ulp * max(temp1,temp2);
01329 result[11] = temp2 / max(d__1,d__2);
01330
01331 d__1 = unfl, d__2 = ulp * max(temp3,temp4);
01332 result[12] = temp4 / max(d__1,d__2);
01333
01334
01335
01336
01337 ntest = 13;
01338 temp1 = *thresh * (.5 - ulp);
01339
01340 i__3 = log2ui;
01341 for (j = 0; j <= i__3; ++j) {
01342 dstech_(&n, &sd[1], &se[1], &d1[1], &temp1, &work[1], &iinfo);
01343 if (iinfo == 0) {
01344 goto L170;
01345 }
01346 temp1 *= 2.;
01347
01348 }
01349
01350 L170:
01351 result[13] = temp1;
01352
01353
01354
01355
01356 if (jtype > 15) {
01357
01358
01359
01360 dcopy_(&n, &sd[1], &c__1, &d4[1], &c__1);
01361 if (n > 0) {
01362 i__3 = n - 1;
01363 dcopy_(&i__3, &se[1], &c__1, &work[1], &c__1);
01364 }
01365 dlaset_("Full", &n, &n, &c_b25, &c_b39, &z__[z_offset], ldu);
01366
01367 ntest = 14;
01368 dpteqr_("V", &n, &d4[1], &work[1], &z__[z_offset], ldu, &work[
01369 n + 1], &iinfo);
01370 if (iinfo != 0) {
01371 io___57.ciunit = *nounit;
01372 s_wsfe(&io___57);
01373 do_fio(&c__1, "DPTEQR(V)", (ftnlen)9);
01374 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01375 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01376 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01377 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer))
01378 ;
01379 e_wsfe();
01380 *info = abs(iinfo);
01381 if (iinfo < 0) {
01382 return 0;
01383 } else {
01384 result[14] = ulpinv;
01385 goto L280;
01386 }
01387 }
01388
01389
01390
01391 dstt21_(&n, &c__0, &sd[1], &se[1], &d4[1], dumma, &z__[
01392 z_offset], ldu, &work[1], &result[14]);
01393
01394
01395
01396 dcopy_(&n, &sd[1], &c__1, &d5[1], &c__1);
01397 if (n > 0) {
01398 i__3 = n - 1;
01399 dcopy_(&i__3, &se[1], &c__1, &work[1], &c__1);
01400 }
01401
01402 ntest = 16;
01403 dpteqr_("N", &n, &d5[1], &work[1], &z__[z_offset], ldu, &work[
01404 n + 1], &iinfo);
01405 if (iinfo != 0) {
01406 io___58.ciunit = *nounit;
01407 s_wsfe(&io___58);
01408 do_fio(&c__1, "DPTEQR(N)", (ftnlen)9);
01409 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01410 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01411 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01412 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer))
01413 ;
01414 e_wsfe();
01415 *info = abs(iinfo);
01416 if (iinfo < 0) {
01417 return 0;
01418 } else {
01419 result[16] = ulpinv;
01420 goto L280;
01421 }
01422 }
01423
01424
01425
01426 temp1 = 0.;
01427 temp2 = 0.;
01428 i__3 = n;
01429 for (j = 1; j <= i__3; ++j) {
01430
01431 d__3 = temp1, d__4 = (d__1 = d4[j], abs(d__1)), d__3 =
01432 max(d__3,d__4), d__4 = (d__2 = d5[j], abs(d__2));
01433 temp1 = max(d__3,d__4);
01434
01435 d__2 = temp2, d__3 = (d__1 = d4[j] - d5[j], abs(d__1));
01436 temp2 = max(d__2,d__3);
01437
01438 }
01439
01440
01441 d__1 = unfl, d__2 = ulp * 100. * max(temp1,temp2);
01442 result[16] = temp2 / max(d__1,d__2);
01443 } else {
01444 result[14] = 0.;
01445 result[15] = 0.;
01446 result[16] = 0.;
01447 }
01448
01449
01450
01451
01452
01453
01454 vl = 0.;
01455 vu = 0.;
01456 il = 0;
01457 iu = 0;
01458 if (jtype == 21) {
01459 ntest = 17;
01460 abstol = unfl + unfl;
01461 dstebz_("A", "E", &n, &vl, &vu, &il, &iu, &abstol, &sd[1], &
01462 se[1], &m, &nsplit, &wr[1], &iwork[1], &iwork[n + 1],
01463 &work[1], &iwork[(n << 1) + 1], &iinfo);
01464 if (iinfo != 0) {
01465 io___66.ciunit = *nounit;
01466 s_wsfe(&io___66);
01467 do_fio(&c__1, "DSTEBZ(A,rel)", (ftnlen)13);
01468 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01469 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01470 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01471 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer))
01472 ;
01473 e_wsfe();
01474 *info = abs(iinfo);
01475 if (iinfo < 0) {
01476 return 0;
01477 } else {
01478 result[17] = ulpinv;
01479 goto L280;
01480 }
01481 }
01482
01483
01484
01485 temp2 = (n * 2. - 1.) * 2. * ulp * 3. / .0625;
01486
01487 temp1 = 0.;
01488 i__3 = n;
01489 for (j = 1; j <= i__3; ++j) {
01490
01491 d__3 = temp1, d__4 = (d__2 = d4[j] - wr[n - j + 1], abs(
01492 d__2)) / (abstol + (d__1 = d4[j], abs(d__1)));
01493 temp1 = max(d__3,d__4);
01494
01495 }
01496
01497 result[17] = temp1 / temp2;
01498 } else {
01499 result[17] = 0.;
01500 }
01501
01502
01503
01504 ntest = 18;
01505 abstol = unfl + unfl;
01506 dstebz_("A", "E", &n, &vl, &vu, &il, &iu, &abstol, &sd[1], &se[1],
01507 &m, &nsplit, &wa1[1], &iwork[1], &iwork[n + 1], &work[1],
01508 &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)", (ftnlen)9);
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 e_wsfe();
01518 *info = abs(iinfo);
01519 if (iinfo < 0) {
01520 return 0;
01521 } else {
01522 result[18] = ulpinv;
01523 goto L280;
01524 }
01525 }
01526
01527
01528
01529 temp1 = 0.;
01530 temp2 = 0.;
01531 i__3 = n;
01532 for (j = 1; j <= i__3; ++j) {
01533
01534 d__3 = temp1, d__4 = (d__1 = d3[j], abs(d__1)), d__3 = max(
01535 d__3,d__4), d__4 = (d__2 = wa1[j], abs(d__2));
01536 temp1 = max(d__3,d__4);
01537
01538 d__2 = temp2, d__3 = (d__1 = d3[j] - wa1[j], abs(d__1));
01539 temp2 = max(d__2,d__3);
01540
01541 }
01542
01543
01544 d__1 = unfl, d__2 = ulp * max(temp1,temp2);
01545 result[18] = temp2 / max(d__1,d__2);
01546
01547
01548
01549
01550 ntest = 19;
01551 if (n <= 1) {
01552 il = 1;
01553 iu = n;
01554 } else {
01555 il = (n - 1) * (integer) dlarnd_(&c__1, iseed2) + 1;
01556 iu = (n - 1) * (integer) dlarnd_(&c__1, iseed2) + 1;
01557 if (iu < il) {
01558 itemp = iu;
01559 iu = il;
01560 il = itemp;
01561 }
01562 }
01563
01564 dstebz_("I", "E", &n, &vl, &vu, &il, &iu, &abstol, &sd[1], &se[1],
01565 &m2, &nsplit, &wa2[1], &iwork[1], &iwork[n + 1], &work[1]
01566 , &iwork[(n << 1) + 1], &iinfo);
01567 if (iinfo != 0) {
01568 io___70.ciunit = *nounit;
01569 s_wsfe(&io___70);
01570 do_fio(&c__1, "DSTEBZ(I)", (ftnlen)9);
01571 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01572 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01573 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01574 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01575 e_wsfe();
01576 *info = abs(iinfo);
01577 if (iinfo < 0) {
01578 return 0;
01579 } else {
01580 result[19] = ulpinv;
01581 goto L280;
01582 }
01583 }
01584
01585
01586
01587
01588 if (n > 0) {
01589 if (il != 1) {
01590
01591 d__1 = (wa1[il] - wa1[il - 1]) * .5, d__2 = ulp * anorm,
01592 d__1 = max(d__1,d__2), d__2 = rtunfl * 2.;
01593 vl = wa1[il] - max(d__1,d__2);
01594 } else {
01595
01596 d__1 = (wa1[n] - wa1[1]) * .5, d__2 = ulp * anorm, d__1 =
01597 max(d__1,d__2), d__2 = rtunfl * 2.;
01598 vl = wa1[1] - max(d__1,d__2);
01599 }
01600 if (iu != n) {
01601
01602 d__1 = (wa1[iu + 1] - wa1[iu]) * .5, d__2 = ulp * anorm,
01603 d__1 = max(d__1,d__2), d__2 = rtunfl * 2.;
01604 vu = wa1[iu] + max(d__1,d__2);
01605 } else {
01606
01607 d__1 = (wa1[n] - wa1[1]) * .5, d__2 = ulp * anorm, d__1 =
01608 max(d__1,d__2), d__2 = rtunfl * 2.;
01609 vu = wa1[n] + max(d__1,d__2);
01610 }
01611 } else {
01612 vl = 0.;
01613 vu = 1.;
01614 }
01615
01616 dstebz_("V", "E", &n, &vl, &vu, &il, &iu, &abstol, &sd[1], &se[1],
01617 &m3, &nsplit, &wa3[1], &iwork[1], &iwork[n + 1], &work[1]
01618 , &iwork[(n << 1) + 1], &iinfo);
01619 if (iinfo != 0) {
01620 io___72.ciunit = *nounit;
01621 s_wsfe(&io___72);
01622 do_fio(&c__1, "DSTEBZ(V)", (ftnlen)9);
01623 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01624 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01625 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01626 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01627 e_wsfe();
01628 *info = abs(iinfo);
01629 if (iinfo < 0) {
01630 return 0;
01631 } else {
01632 result[19] = ulpinv;
01633 goto L280;
01634 }
01635 }
01636
01637 if (m3 == 0 && n != 0) {
01638 result[19] = ulpinv;
01639 goto L280;
01640 }
01641
01642
01643
01644 temp1 = dsxt1_(&c__1, &wa2[1], &m2, &wa3[1], &m3, &abstol, &ulp, &
01645 unfl);
01646 temp2 = dsxt1_(&c__1, &wa3[1], &m3, &wa2[1], &m2, &abstol, &ulp, &
01647 unfl);
01648 if (n > 0) {
01649
01650 d__2 = (d__1 = wa1[n], abs(d__1)), d__3 = abs(wa1[1]);
01651 temp3 = max(d__2,d__3);
01652 } else {
01653 temp3 = 0.;
01654 }
01655
01656
01657 d__1 = unfl, d__2 = temp3 * ulp;
01658 result[19] = (temp1 + temp2) / max(d__1,d__2);
01659
01660
01661
01662
01663
01664 ntest = 21;
01665 dstebz_("A", "B", &n, &vl, &vu, &il, &iu, &abstol, &sd[1], &se[1],
01666 &m, &nsplit, &wa1[1], &iwork[1], &iwork[n + 1], &work[1],
01667 &iwork[(n << 1) + 1], &iinfo);
01668 if (iinfo != 0) {
01669 io___73.ciunit = *nounit;
01670 s_wsfe(&io___73);
01671 do_fio(&c__1, "DSTEBZ(A,B)", (ftnlen)11);
01672 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01673 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01674 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01675 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01676 e_wsfe();
01677 *info = abs(iinfo);
01678 if (iinfo < 0) {
01679 return 0;
01680 } else {
01681 result[20] = ulpinv;
01682 result[21] = ulpinv;
01683 goto L280;
01684 }
01685 }
01686
01687 dstein_(&n, &sd[1], &se[1], &m, &wa1[1], &iwork[1], &iwork[n + 1],
01688 &z__[z_offset], ldu, &work[1], &iwork[(n << 1) + 1], &
01689 iwork[n * 3 + 1], &iinfo);
01690 if (iinfo != 0) {
01691 io___74.ciunit = *nounit;
01692 s_wsfe(&io___74);
01693 do_fio(&c__1, "DSTEIN", (ftnlen)6);
01694 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01695 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01696 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01697 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01698 e_wsfe();
01699 *info = abs(iinfo);
01700 if (iinfo < 0) {
01701 return 0;
01702 } else {
01703 result[20] = ulpinv;
01704 result[21] = ulpinv;
01705 goto L280;
01706 }
01707 }
01708
01709
01710
01711 dstt21_(&n, &c__0, &sd[1], &se[1], &wa1[1], dumma, &z__[z_offset],
01712 ldu, &work[1], &result[20]);
01713
01714
01715
01716
01717
01718 dcopy_(&n, &sd[1], &c__1, &d1[1], &c__1);
01719 if (n > 0) {
01720 i__3 = n - 1;
01721 dcopy_(&i__3, &se[1], &c__1, &work[1], &c__1);
01722 }
01723 dlaset_("Full", &n, &n, &c_b25, &c_b39, &z__[z_offset], ldu);
01724
01725 ntest = 22;
01726 i__3 = lwedc - n;
01727 dstedc_("I", &n, &d1[1], &work[1], &z__[z_offset], ldu, &work[n +
01728 1], &i__3, &iwork[1], &liwedc, &iinfo);
01729 if (iinfo != 0) {
01730 io___75.ciunit = *nounit;
01731 s_wsfe(&io___75);
01732 do_fio(&c__1, "DSTEDC(I)", (ftnlen)9);
01733 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01734 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01735 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01736 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01737 e_wsfe();
01738 *info = abs(iinfo);
01739 if (iinfo < 0) {
01740 return 0;
01741 } else {
01742 result[22] = ulpinv;
01743 goto L280;
01744 }
01745 }
01746
01747
01748
01749 dstt21_(&n, &c__0, &sd[1], &se[1], &d1[1], dumma, &z__[z_offset],
01750 ldu, &work[1], &result[22]);
01751
01752
01753
01754
01755
01756 dcopy_(&n, &sd[1], &c__1, &d1[1], &c__1);
01757 if (n > 0) {
01758 i__3 = n - 1;
01759 dcopy_(&i__3, &se[1], &c__1, &work[1], &c__1);
01760 }
01761 dlaset_("Full", &n, &n, &c_b25, &c_b39, &z__[z_offset], ldu);
01762
01763 ntest = 24;
01764 i__3 = lwedc - n;
01765 dstedc_("V", &n, &d1[1], &work[1], &z__[z_offset], ldu, &work[n +
01766 1], &i__3, &iwork[1], &liwedc, &iinfo);
01767 if (iinfo != 0) {
01768 io___76.ciunit = *nounit;
01769 s_wsfe(&io___76);
01770 do_fio(&c__1, "DSTEDC(V)", (ftnlen)9);
01771 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01772 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01773 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01774 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01775 e_wsfe();
01776 *info = abs(iinfo);
01777 if (iinfo < 0) {
01778 return 0;
01779 } else {
01780 result[24] = ulpinv;
01781 goto L280;
01782 }
01783 }
01784
01785
01786
01787 dstt21_(&n, &c__0, &sd[1], &se[1], &d1[1], dumma, &z__[z_offset],
01788 ldu, &work[1], &result[24]);
01789
01790
01791
01792
01793
01794 dcopy_(&n, &sd[1], &c__1, &d2[1], &c__1);
01795 if (n > 0) {
01796 i__3 = n - 1;
01797 dcopy_(&i__3, &se[1], &c__1, &work[1], &c__1);
01798 }
01799 dlaset_("Full", &n, &n, &c_b25, &c_b39, &z__[z_offset], ldu);
01800
01801 ntest = 26;
01802 i__3 = lwedc - n;
01803 dstedc_("N", &n, &d2[1], &work[1], &z__[z_offset], ldu, &work[n +
01804 1], &i__3, &iwork[1], &liwedc, &iinfo);
01805 if (iinfo != 0) {
01806 io___77.ciunit = *nounit;
01807 s_wsfe(&io___77);
01808 do_fio(&c__1, "DSTEDC(N)", (ftnlen)9);
01809 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01810 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01811 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01812 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01813 e_wsfe();
01814 *info = abs(iinfo);
01815 if (iinfo < 0) {
01816 return 0;
01817 } else {
01818 result[26] = ulpinv;
01819 goto L280;
01820 }
01821 }
01822
01823
01824
01825 temp1 = 0.;
01826 temp2 = 0.;
01827
01828 i__3 = n;
01829 for (j = 1; j <= i__3; ++j) {
01830
01831 d__3 = temp1, d__4 = (d__1 = d1[j], abs(d__1)), d__3 = max(
01832 d__3,d__4), d__4 = (d__2 = d2[j], abs(d__2));
01833 temp1 = max(d__3,d__4);
01834
01835 d__2 = temp2, d__3 = (d__1 = d1[j] - d2[j], abs(d__1));
01836 temp2 = max(d__2,d__3);
01837
01838 }
01839
01840
01841 d__1 = unfl, d__2 = ulp * max(temp1,temp2);
01842 result[26] = temp2 / max(d__1,d__2);
01843
01844
01845
01846 if (ilaenv_(&c__10, "DSTEMR", "VA", &c__1, &c__0, &c__0, &c__0) == 1 && ilaenv_(&c__11, "DSTEMR",
01847 "VA", &c__1, &c__0, &c__0, &c__0) ==
01848 1) {
01849
01850
01851
01852
01853
01854
01855 vl = 0.;
01856 vu = 0.;
01857 il = 0;
01858 iu = 0;
01859 if (FALSE_) {
01860 ntest = 27;
01861 abstol = unfl + unfl;
01862 i__3 = *lwork - (n << 1);
01863 dstemr_("V", "A", &n, &sd[1], &se[1], &vl, &vu, &il, &iu,
01864 &m, &wr[1], &z__[z_offset], ldu, &n, &iwork[1], &
01865 tryrac, &work[1], lwork, &iwork[(n << 1) + 1], &
01866 i__3, &iinfo);
01867 if (iinfo != 0) {
01868 io___78.ciunit = *nounit;
01869 s_wsfe(&io___78);
01870 do_fio(&c__1, "DSTEMR(V,A,rel)", (ftnlen)15);
01871 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer))
01872 ;
01873 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01874 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer))
01875 ;
01876 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
01877 integer));
01878 e_wsfe();
01879 *info = abs(iinfo);
01880 if (iinfo < 0) {
01881 return 0;
01882 } else {
01883 result[27] = ulpinv;
01884 goto L270;
01885 }
01886 }
01887
01888
01889
01890 temp2 = (n * 2. - 1.) * 2. * ulp * 3. / .0625;
01891
01892 temp1 = 0.;
01893 i__3 = n;
01894 for (j = 1; j <= i__3; ++j) {
01895
01896 d__3 = temp1, d__4 = (d__2 = d4[j] - wr[n - j + 1],
01897 abs(d__2)) / (abstol + (d__1 = d4[j], abs(
01898 d__1)));
01899 temp1 = max(d__3,d__4);
01900
01901 }
01902
01903 result[27] = temp1 / temp2;
01904
01905 il = (n - 1) * (integer) dlarnd_(&c__1, iseed2) + 1;
01906 iu = (n - 1) * (integer) dlarnd_(&c__1, iseed2) + 1;
01907 if (iu < il) {
01908 itemp = iu;
01909 iu = il;
01910 il = itemp;
01911 }
01912
01913 if (FALSE_) {
01914 ntest = 28;
01915 abstol = unfl + unfl;
01916 i__3 = *lwork - (n << 1);
01917 dstemr_("V", "I", &n, &sd[1], &se[1], &vl, &vu, &il, &
01918 iu, &m, &wr[1], &z__[z_offset], ldu, &n, &
01919 iwork[1], &tryrac, &work[1], lwork, &iwork[(n
01920 << 1) + 1], &i__3, &iinfo);
01921
01922 if (iinfo != 0) {
01923 io___79.ciunit = *nounit;
01924 s_wsfe(&io___79);
01925 do_fio(&c__1, "DSTEMR(V,I,rel)", (ftnlen)15);
01926 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(
01927 integer));
01928 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer))
01929 ;
01930 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(
01931 integer));
01932 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
01933 integer));
01934 e_wsfe();
01935 *info = abs(iinfo);
01936 if (iinfo < 0) {
01937 return 0;
01938 } else {
01939 result[28] = ulpinv;
01940 goto L270;
01941 }
01942 }
01943
01944
01945
01946
01947 temp2 = (n * 2. - 1.) * 2. * ulp * 3. / .0625;
01948
01949 temp1 = 0.;
01950 i__3 = iu;
01951 for (j = il; j <= i__3; ++j) {
01952
01953 d__3 = temp1, d__4 = (d__2 = wr[j - il + 1] - d4[
01954 n - j + 1], abs(d__2)) / (abstol + (d__1 =
01955 wr[j - il + 1], abs(d__1)));
01956 temp1 = max(d__3,d__4);
01957
01958 }
01959
01960 result[28] = temp1 / temp2;
01961 } else {
01962 result[28] = 0.;
01963 }
01964 } else {
01965 result[27] = 0.;
01966 result[28] = 0.;
01967 }
01968
01969
01970
01971
01972
01973 dcopy_(&n, &sd[1], &c__1, &d5[1], &c__1);
01974 if (n > 0) {
01975 i__3 = n - 1;
01976 dcopy_(&i__3, &se[1], &c__1, &work[1], &c__1);
01977 }
01978 dlaset_("Full", &n, &n, &c_b25, &c_b39, &z__[z_offset], ldu);
01979
01980 if (FALSE_) {
01981 ntest = 29;
01982 il = (n - 1) * (integer) dlarnd_(&c__1, iseed2) + 1;
01983 iu = (n - 1) * (integer) dlarnd_(&c__1, iseed2) + 1;
01984 if (iu < il) {
01985 itemp = iu;
01986 iu = il;
01987 il = itemp;
01988 }
01989 i__3 = *lwork - n;
01990 i__4 = *liwork - (n << 1);
01991 dstemr_("V", "I", &n, &d5[1], &work[1], &vl, &vu, &il, &
01992 iu, &m, &d1[1], &z__[z_offset], ldu, &n, &iwork[1]
01993 , &tryrac, &work[n + 1], &i__3, &iwork[(n << 1) +
01994 1], &i__4, &iinfo);
01995 if (iinfo != 0) {
01996 io___80.ciunit = *nounit;
01997 s_wsfe(&io___80);
01998 do_fio(&c__1, "DSTEMR(V,I)", (ftnlen)11);
01999 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer))
02000 ;
02001 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
02002 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer))
02003 ;
02004 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
02005 integer));
02006 e_wsfe();
02007 *info = abs(iinfo);
02008 if (iinfo < 0) {
02009 return 0;
02010 } else {
02011 result[29] = ulpinv;
02012 goto L280;
02013 }
02014 }
02015
02016
02017
02018 dstt22_(&n, &m, &c__0, &sd[1], &se[1], &d1[1], dumma, &
02019 z__[z_offset], ldu, &work[1], &m, &result[29]);
02020
02021
02022
02023
02024
02025 dcopy_(&n, &sd[1], &c__1, &d5[1], &c__1);
02026 if (n > 0) {
02027 i__3 = n - 1;
02028 dcopy_(&i__3, &se[1], &c__1, &work[1], &c__1);
02029 }
02030
02031 ntest = 31;
02032 i__3 = *lwork - n;
02033 i__4 = *liwork - (n << 1);
02034 dstemr_("N", "I", &n, &d5[1], &work[1], &vl, &vu, &il, &
02035 iu, &m, &d2[1], &z__[z_offset], ldu, &n, &iwork[1]
02036 , &tryrac, &work[n + 1], &i__3, &iwork[(n << 1) +
02037 1], &i__4, &iinfo);
02038 if (iinfo != 0) {
02039 io___81.ciunit = *nounit;
02040 s_wsfe(&io___81);
02041 do_fio(&c__1, "DSTEMR(N,I)", (ftnlen)11);
02042 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer))
02043 ;
02044 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
02045 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer))
02046 ;
02047 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
02048 integer));
02049 e_wsfe();
02050 *info = abs(iinfo);
02051 if (iinfo < 0) {
02052 return 0;
02053 } else {
02054 result[31] = ulpinv;
02055 goto L280;
02056 }
02057 }
02058
02059
02060
02061 temp1 = 0.;
02062 temp2 = 0.;
02063
02064 i__3 = iu - il + 1;
02065 for (j = 1; j <= i__3; ++j) {
02066
02067 d__3 = temp1, d__4 = (d__1 = d1[j], abs(d__1)), d__3 =
02068 max(d__3,d__4), d__4 = (d__2 = d2[j], abs(
02069 d__2));
02070 temp1 = max(d__3,d__4);
02071
02072 d__2 = temp2, d__3 = (d__1 = d1[j] - d2[j], abs(d__1))
02073 ;
02074 temp2 = max(d__2,d__3);
02075
02076 }
02077
02078
02079 d__1 = unfl, d__2 = ulp * max(temp1,temp2);
02080 result[31] = temp2 / max(d__1,d__2);
02081
02082
02083
02084
02085
02086
02087 dcopy_(&n, &sd[1], &c__1, &d5[1], &c__1);
02088 if (n > 0) {
02089 i__3 = n - 1;
02090 dcopy_(&i__3, &se[1], &c__1, &work[1], &c__1);
02091 }
02092 dlaset_("Full", &n, &n, &c_b25, &c_b39, &z__[z_offset],
02093 ldu);
02094
02095 ntest = 32;
02096
02097 if (n > 0) {
02098 if (il != 1) {
02099
02100 d__1 = (d2[il] - d2[il - 1]) * .5, d__2 = ulp *
02101 anorm, d__1 = max(d__1,d__2), d__2 =
02102 rtunfl * 2.;
02103 vl = d2[il] - max(d__1,d__2);
02104 } else {
02105
02106 d__1 = (d2[n] - d2[1]) * .5, d__2 = ulp * anorm,
02107 d__1 = max(d__1,d__2), d__2 = rtunfl * 2.;
02108 vl = d2[1] - max(d__1,d__2);
02109 }
02110 if (iu != n) {
02111
02112 d__1 = (d2[iu + 1] - d2[iu]) * .5, d__2 = ulp *
02113 anorm, d__1 = max(d__1,d__2), d__2 =
02114 rtunfl * 2.;
02115 vu = d2[iu] + max(d__1,d__2);
02116 } else {
02117
02118 d__1 = (d2[n] - d2[1]) * .5, d__2 = ulp * anorm,
02119 d__1 = max(d__1,d__2), d__2 = rtunfl * 2.;
02120 vu = d2[n] + max(d__1,d__2);
02121 }
02122 } else {
02123 vl = 0.;
02124 vu = 1.;
02125 }
02126
02127 i__3 = *lwork - n;
02128 i__4 = *liwork - (n << 1);
02129 dstemr_("V", "V", &n, &d5[1], &work[1], &vl, &vu, &il, &
02130 iu, &m, &d1[1], &z__[z_offset], ldu, &n, &iwork[1]
02131 , &tryrac, &work[n + 1], &i__3, &iwork[(n << 1) +
02132 1], &i__4, &iinfo);
02133 if (iinfo != 0) {
02134 io___82.ciunit = *nounit;
02135 s_wsfe(&io___82);
02136 do_fio(&c__1, "DSTEMR(V,V)", (ftnlen)11);
02137 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer))
02138 ;
02139 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
02140 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer))
02141 ;
02142 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
02143 integer));
02144 e_wsfe();
02145 *info = abs(iinfo);
02146 if (iinfo < 0) {
02147 return 0;
02148 } else {
02149 result[32] = ulpinv;
02150 goto L280;
02151 }
02152 }
02153
02154
02155
02156 dstt22_(&n, &m, &c__0, &sd[1], &se[1], &d1[1], dumma, &
02157 z__[z_offset], ldu, &work[1], &m, &result[32]);
02158
02159
02160
02161
02162
02163 dcopy_(&n, &sd[1], &c__1, &d5[1], &c__1);
02164 if (n > 0) {
02165 i__3 = n - 1;
02166 dcopy_(&i__3, &se[1], &c__1, &work[1], &c__1);
02167 }
02168
02169 ntest = 34;
02170 i__3 = *lwork - n;
02171 i__4 = *liwork - (n << 1);
02172 dstemr_("N", "V", &n, &d5[1], &work[1], &vl, &vu, &il, &
02173 iu, &m, &d2[1], &z__[z_offset], ldu, &n, &iwork[1]
02174 , &tryrac, &work[n + 1], &i__3, &iwork[(n << 1) +
02175 1], &i__4, &iinfo);
02176 if (iinfo != 0) {
02177 io___83.ciunit = *nounit;
02178 s_wsfe(&io___83);
02179 do_fio(&c__1, "DSTEMR(N,V)", (ftnlen)11);
02180 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer))
02181 ;
02182 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
02183 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer))
02184 ;
02185 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
02186 integer));
02187 e_wsfe();
02188 *info = abs(iinfo);
02189 if (iinfo < 0) {
02190 return 0;
02191 } else {
02192 result[34] = ulpinv;
02193 goto L280;
02194 }
02195 }
02196
02197
02198
02199 temp1 = 0.;
02200 temp2 = 0.;
02201
02202 i__3 = iu - il + 1;
02203 for (j = 1; j <= i__3; ++j) {
02204
02205 d__3 = temp1, d__4 = (d__1 = d1[j], abs(d__1)), d__3 =
02206 max(d__3,d__4), d__4 = (d__2 = d2[j], abs(
02207 d__2));
02208 temp1 = max(d__3,d__4);
02209
02210 d__2 = temp2, d__3 = (d__1 = d1[j] - d2[j], abs(d__1))
02211 ;
02212 temp2 = max(d__2,d__3);
02213
02214 }
02215
02216
02217 d__1 = unfl, d__2 = ulp * max(temp1,temp2);
02218 result[34] = temp2 / max(d__1,d__2);
02219 } else {
02220 result[29] = 0.;
02221 result[30] = 0.;
02222 result[31] = 0.;
02223 result[32] = 0.;
02224 result[33] = 0.;
02225 result[34] = 0.;
02226 }
02227
02228
02229
02230
02231
02232
02233 dcopy_(&n, &sd[1], &c__1, &d5[1], &c__1);
02234 if (n > 0) {
02235 i__3 = n - 1;
02236 dcopy_(&i__3, &se[1], &c__1, &work[1], &c__1);
02237 }
02238
02239 ntest = 35;
02240
02241 i__3 = *lwork - n;
02242 i__4 = *liwork - (n << 1);
02243 dstemr_("V", "A", &n, &d5[1], &work[1], &vl, &vu, &il, &iu, &
02244 m, &d1[1], &z__[z_offset], ldu, &n, &iwork[1], &
02245 tryrac, &work[n + 1], &i__3, &iwork[(n << 1) + 1], &
02246 i__4, &iinfo);
02247 if (iinfo != 0) {
02248 io___84.ciunit = *nounit;
02249 s_wsfe(&io___84);
02250 do_fio(&c__1, "DSTEMR(V,A)", (ftnlen)11);
02251 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
02252 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
02253 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
02254 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer))
02255 ;
02256 e_wsfe();
02257 *info = abs(iinfo);
02258 if (iinfo < 0) {
02259 return 0;
02260 } else {
02261 result[35] = ulpinv;
02262 goto L280;
02263 }
02264 }
02265
02266
02267
02268 dstt22_(&n, &m, &c__0, &sd[1], &se[1], &d1[1], dumma, &z__[
02269 z_offset], ldu, &work[1], &m, &result[35]);
02270
02271
02272
02273
02274
02275 dcopy_(&n, &sd[1], &c__1, &d5[1], &c__1);
02276 if (n > 0) {
02277 i__3 = n - 1;
02278 dcopy_(&i__3, &se[1], &c__1, &work[1], &c__1);
02279 }
02280
02281 ntest = 37;
02282 i__3 = *lwork - n;
02283 i__4 = *liwork - (n << 1);
02284 dstemr_("N", "A", &n, &d5[1], &work[1], &vl, &vu, &il, &iu, &
02285 m, &d2[1], &z__[z_offset], ldu, &n, &iwork[1], &
02286 tryrac, &work[n + 1], &i__3, &iwork[(n << 1) + 1], &
02287 i__4, &iinfo);
02288 if (iinfo != 0) {
02289 io___85.ciunit = *nounit;
02290 s_wsfe(&io___85);
02291 do_fio(&c__1, "DSTEMR(N,A)", (ftnlen)11);
02292 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
02293 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
02294 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
02295 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer))
02296 ;
02297 e_wsfe();
02298 *info = abs(iinfo);
02299 if (iinfo < 0) {
02300 return 0;
02301 } else {
02302 result[37] = ulpinv;
02303 goto L280;
02304 }
02305 }
02306
02307
02308
02309 temp1 = 0.;
02310 temp2 = 0.;
02311
02312 i__3 = n;
02313 for (j = 1; j <= i__3; ++j) {
02314
02315 d__3 = temp1, d__4 = (d__1 = d1[j], abs(d__1)), d__3 =
02316 max(d__3,d__4), d__4 = (d__2 = d2[j], abs(d__2));
02317 temp1 = max(d__3,d__4);
02318
02319 d__2 = temp2, d__3 = (d__1 = d1[j] - d2[j], abs(d__1));
02320 temp2 = max(d__2,d__3);
02321
02322 }
02323
02324
02325 d__1 = unfl, d__2 = ulp * max(temp1,temp2);
02326 result[37] = temp2 / max(d__1,d__2);
02327 }
02328 L270:
02329 L280:
02330 ntestt += ntest;
02331
02332
02333
02334
02335
02336
02337 i__3 = ntest;
02338 for (jr = 1; jr <= i__3; ++jr) {
02339 if (result[jr] >= *thresh) {
02340
02341
02342
02343
02344 if (nerrs == 0) {
02345 io___86.ciunit = *nounit;
02346 s_wsfe(&io___86);
02347 do_fio(&c__1, "DST", (ftnlen)3);
02348 e_wsfe();
02349 io___87.ciunit = *nounit;
02350 s_wsfe(&io___87);
02351 e_wsfe();
02352 io___88.ciunit = *nounit;
02353 s_wsfe(&io___88);
02354 e_wsfe();
02355 io___89.ciunit = *nounit;
02356 s_wsfe(&io___89);
02357 do_fio(&c__1, "Symmetric", (ftnlen)9);
02358 e_wsfe();
02359 io___90.ciunit = *nounit;
02360 s_wsfe(&io___90);
02361 e_wsfe();
02362
02363
02364
02365 io___91.ciunit = *nounit;
02366 s_wsfe(&io___91);
02367 e_wsfe();
02368 }
02369 ++nerrs;
02370 io___92.ciunit = *nounit;
02371 s_wsfe(&io___92);
02372 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
02373 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer))
02374 ;
02375 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
02376 do_fio(&c__1, (char *)&jr, (ftnlen)sizeof(integer));
02377 do_fio(&c__1, (char *)&result[jr], (ftnlen)sizeof(
02378 doublereal));
02379 e_wsfe();
02380 }
02381
02382 }
02383 L300:
02384 ;
02385 }
02386
02387 }
02388
02389
02390
02391 dlasum_("DST", nounit, &nerrs, &ntestt);
02392 return 0;
02393
02394
02395
02396
02397
02398
02399
02400
02401
02402
02403
02404 }