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