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__4 = 4;
00021 static real c_b17 = 1.f;
00022 static integer c__3 = 3;
00023 static integer c__1 = 1;
00024 static logical c_true = TRUE_;
00025 static logical c_false = FALSE_;
00026 static integer c__2 = 2;
00027
00028 int cchkgg_(integer *nsizes, integer *nn, integer *ntypes,
00029 logical *dotype, integer *iseed, real *thresh, logical *tstdif, real *
00030 thrshn, integer *nounit, complex *a, integer *lda, complex *b,
00031 complex *h__, complex *t, complex *s1, complex *s2, complex *p1,
00032 complex *p2, complex *u, integer *ldu, complex *v, complex *q,
00033 complex *z__, complex *alpha1, complex *beta1, complex *alpha3,
00034 complex *beta3, complex *evectl, complex *evectr, complex *work,
00035 integer *lwork, real *rwork, logical *llwork, real *result, integer *
00036 info)
00037 {
00038
00039
00040 static integer kclass[26] = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,
00041 2,2,2,3 };
00042 static integer kbmagn[26] = { 1,1,1,1,1,1,1,1,3,2,3,2,2,3,1,1,1,1,1,1,1,3,
00043 2,3,2,1 };
00044 static integer ktrian[26] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,
00045 1,1,1,1 };
00046 static logical lasign[26] = { FALSE_,FALSE_,FALSE_,FALSE_,FALSE_,FALSE_,
00047 TRUE_,FALSE_,TRUE_,TRUE_,FALSE_,FALSE_,TRUE_,TRUE_,TRUE_,FALSE_,
00048 TRUE_,FALSE_,FALSE_,FALSE_,TRUE_,TRUE_,TRUE_,TRUE_,TRUE_,FALSE_ };
00049 static logical lbsign[26] = { FALSE_,FALSE_,FALSE_,FALSE_,FALSE_,FALSE_,
00050 FALSE_,TRUE_,FALSE_,FALSE_,TRUE_,TRUE_,FALSE_,FALSE_,TRUE_,FALSE_,
00051 TRUE_,FALSE_,FALSE_,FALSE_,FALSE_,FALSE_,FALSE_,FALSE_,FALSE_,
00052 FALSE_ };
00053 static integer kz1[6] = { 0,1,2,1,3,3 };
00054 static integer kz2[6] = { 0,0,1,2,1,1 };
00055 static integer kadd[6] = { 0,0,0,0,3,2 };
00056 static integer katype[26] = { 0,1,0,1,2,3,4,1,4,4,1,1,4,4,4,2,4,5,8,7,9,4,
00057 4,4,4,0 };
00058 static integer kbtype[26] = { 0,0,1,1,2,-3,1,4,1,1,4,4,1,1,-4,2,-4,8,8,8,
00059 8,8,8,8,8,0 };
00060 static integer kazero[26] = { 1,1,1,1,1,1,2,1,2,2,1,1,2,2,3,1,3,5,5,5,5,3,
00061 3,3,3,1 };
00062 static integer kbzero[26] = { 1,1,1,1,1,1,1,2,1,1,2,2,1,1,4,1,4,6,6,6,6,4,
00063 4,4,4,1 };
00064 static integer kamagn[26] = { 1,1,1,1,1,1,1,1,2,3,2,3,2,3,1,1,1,1,1,1,1,2,
00065 3,3,2,1 };
00066
00067
00068 static char fmt_9999[] = "(\002 CCHKGG: \002,a,\002 returned INFO=\002,i"
00069 "6,\002.\002,/9x,\002N=\002,i6,\002, JTYPE=\002,i6,\002, ISEED="
00070 "(\002,3(i5,\002,\002),i5,\002)\002)";
00071 static char fmt_9998[] = "(\002 CCHKGG: \002,a,\002 Eigenvectors from"
00072 " \002,a,\002 incorrectly \002,\002normalized.\002,/\002 Bits of "
00073 "error=\002,0p,g10.3,\002,\002,9x,\002N=\002,i6,\002, JTYPE=\002,"
00074 "i6,\002, ISEED=(\002,3(i5,\002,\002),i5,\002)\002)";
00075 static char fmt_9997[] = "(1x,a3,\002 -- Complex Generalized eigenvalue "
00076 "problem\002)";
00077 static char fmt_9996[] = "(\002 Matrix types (see CCHKGG for details):"
00078 " \002)";
00079 static char fmt_9995[] = "(\002 Special Matrices:\002,23x,\002(J'=transp"
00080 "osed Jordan block)\002,/\002 1=(0,0) 2=(I,0) 3=(0,I) 4=(I,I"
00081 ") 5=(J',J') \002,\0026=(diag(J',I), diag(I,J'))\002,/\002 Diag"
00082 "onal Matrices: ( \002,\002D=diag(0,1,2,...) )\002,/\002 7=(D,"
00083 "I) 9=(large*D, small*I\002,\002) 11=(large*I, small*D) 13=(l"
00084 "arge*D, large*I)\002,/\002 8=(I,D) 10=(small*D, large*I) 12="
00085 "(small*I, large*D) \002,\002 14=(small*D, small*I)\002,/\002 15"
00086 "=(D, reversed D)\002)";
00087 static char fmt_9994[] = "(\002 Matrices Rotated by Random \002,a,\002 M"
00088 "atrices U, V:\002,/\002 16=Transposed Jordan Blocks "
00089 " 19=geometric \002,\002alpha, beta=0,1\002,/\002 17=arithm. alp"
00090 "ha&beta \002,\002 20=arithmetic alpha, beta=0,"
00091 "1\002,/\002 18=clustered \002,\002alpha, beta=0,1 21"
00092 "=random alpha, beta=0,1\002,/\002 Large & Small Matrices:\002,"
00093 "/\002 22=(large, small) \002,\00223=(small,large) 24=(smal"
00094 "l,small) 25=(large,large)\002,/\002 26=random O(1) matrices"
00095 ".\002)";
00096 static char fmt_9993[] = "(/\002 Tests performed: (H is Hessenberg, S "
00097 "is Schur, B, \002,\002T, P are triangular,\002,/20x,\002U, V, Q,"
00098 " and Z are \002,a,\002, l and r are the\002,/20x,\002appropriate"
00099 " left and right eigenvectors, resp., a is\002,/20x,\002alpha, b "
00100 "is beta, and \002,a,\002 means \002,a,\002.)\002,/\002 1 = | A -"
00101 " U H V\002,a,\002 | / ( |A| n ulp ) 2 = | B - U T V\002,a"
00102 ",\002 | / ( |B| n ulp )\002,/\002 3 = | I - UU\002,a,\002 | / ( "
00103 "n ulp ) 4 = | I - VV\002,a,\002 | / ( n ulp )\002,"
00104 "/\002 5 = | H - Q S Z\002,a,\002 | / ( |H| n ulp )\002,6x,\0026 "
00105 "= | T - Q P Z\002,a,\002 | / ( |T| n ulp )\002,/\002 7 = | I - QQ"
00106 "\002,a,\002 | / ( n ulp ) 8 = | I - ZZ\002,a,\002 | "
00107 "/ ( n ulp )\002,/\002 9 = max | ( b S - a P )\002,a,\002 l | / c"
00108 "onst. 10 = max | ( b H - a T )\002,a,\002 l | / const.\002,/"
00109 "\002 11= max | ( b S - a P ) r | / const. 12 = max | ( b H\002,"
00110 "\002 - a T ) r | / const.\002,/1x)";
00111 static char fmt_9992[] = "(\002 Matrix order=\002,i5,\002, type=\002,i2"
00112 ",\002, seed=\002,4(i4,\002,\002),\002 result \002,i2,\002 is\002"
00113 ",0p,f8.2)";
00114 static char fmt_9991[] = "(\002 Matrix order=\002,i5,\002, type=\002,i2"
00115 ",\002, seed=\002,4(i4,\002,\002),\002 result \002,i2,\002 is\002"
00116 ",1p,e10.3)";
00117
00118
00119 integer a_dim1, a_offset, b_dim1, b_offset, evectl_dim1, evectl_offset,
00120 evectr_dim1, evectr_offset, h_dim1, h_offset, p1_dim1, p1_offset,
00121 p2_dim1, p2_offset, q_dim1, q_offset, s1_dim1, s1_offset, s2_dim1,
00122 s2_offset, t_dim1, t_offset, u_dim1, u_offset, v_dim1, v_offset,
00123 z_dim1, z_offset, i__1, i__2, i__3, i__4, i__5, i__6, i__7;
00124 real r__1, r__2;
00125 complex q__1, q__2, q__3;
00126
00127
00128 double r_sign(real *, real *), c_abs(complex *);
00129 void r_cnjg(complex *, complex *);
00130 integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00131
00132
00133 integer j, n, i1, n1, jc, in, jr;
00134 real ulp;
00135 integer iadd, nmax;
00136 real temp1, temp2;
00137 logical badnn;
00138 extern int cget51_(integer *, integer *, complex *,
00139 integer *, complex *, integer *, complex *, integer *, complex *,
00140 integer *, complex *, real *, real *), cget52_(logical *, integer
00141 *, complex *, integer *, complex *, integer *, complex *, integer
00142 *, complex *, complex *, complex *, real *, real *);
00143 real dumma[4];
00144 integer iinfo;
00145 real rmagn[4];
00146 complex ctemp;
00147 real anorm, bnorm;
00148 integer nmats, jsize, nerrs, jtype, ntest;
00149 extern int cgeqr2_(integer *, integer *, complex *,
00150 integer *, complex *, complex *, integer *), clatm4_(integer *,
00151 integer *, integer *, integer *, logical *, real *, real *, real *
00152 , integer *, integer *, complex *, integer *), cunm2r_(char *,
00153 char *, integer *, integer *, integer *, complex *, integer *,
00154 complex *, complex *, integer *, complex *, integer *), slabad_(real *, real *);
00155 extern doublereal clange_(char *, integer *, integer *, complex *,
00156 integer *, real *);
00157 extern int cgghrd_(char *, char *, integer *, integer *,
00158 integer *, complex *, integer *, complex *, integer *, complex *,
00159 integer *, complex *, integer *, integer *),
00160 clarfg_(integer *, complex *, complex *, integer *, complex *);
00161 extern VOID clarnd_(complex *, integer *, integer *);
00162 complex cdumma[4];
00163 extern doublereal slamch_(char *);
00164 extern int clacpy_(char *, integer *, integer *, complex
00165 *, integer *, complex *, integer *), claset_(char *,
00166 integer *, integer *, complex *, complex *, complex *, integer *);
00167 real safmin, safmax;
00168 integer ioldsd[4];
00169 extern int chgeqz_(char *, char *, char *, integer *,
00170 integer *, integer *, complex *, integer *, complex *, integer *,
00171 complex *, complex *, complex *, integer *, complex *, integer *,
00172 complex *, integer *, real *, integer *),
00173 ctgevc_(char *, char *, logical *, integer *, complex *, integer *
00174 , complex *, integer *, complex *, integer *, complex *, integer *
00175 , integer *, integer *, complex *, real *, integer *), xerbla_(char *, integer *), slasum_(char *,
00176 integer *, integer *, integer *);
00177 real ulpinv;
00178 integer lwkopt, mtypes, ntestt;
00179
00180
00181 static cilist io___41 = { 0, 0, 0, fmt_9999, 0 };
00182 static cilist io___42 = { 0, 0, 0, fmt_9999, 0 };
00183 static cilist io___43 = { 0, 0, 0, fmt_9999, 0 };
00184 static cilist io___44 = { 0, 0, 0, fmt_9999, 0 };
00185 static cilist io___45 = { 0, 0, 0, fmt_9999, 0 };
00186 static cilist io___46 = { 0, 0, 0, fmt_9999, 0 };
00187 static cilist io___47 = { 0, 0, 0, fmt_9999, 0 };
00188 static cilist io___48 = { 0, 0, 0, fmt_9999, 0 };
00189 static cilist io___51 = { 0, 0, 0, fmt_9999, 0 };
00190 static cilist io___52 = { 0, 0, 0, fmt_9999, 0 };
00191 static cilist io___54 = { 0, 0, 0, fmt_9998, 0 };
00192 static cilist io___55 = { 0, 0, 0, fmt_9999, 0 };
00193 static cilist io___56 = { 0, 0, 0, fmt_9998, 0 };
00194 static cilist io___57 = { 0, 0, 0, fmt_9999, 0 };
00195 static cilist io___58 = { 0, 0, 0, fmt_9999, 0 };
00196 static cilist io___59 = { 0, 0, 0, fmt_9998, 0 };
00197 static cilist io___60 = { 0, 0, 0, fmt_9999, 0 };
00198 static cilist io___61 = { 0, 0, 0, fmt_9998, 0 };
00199 static cilist io___64 = { 0, 0, 0, fmt_9997, 0 };
00200 static cilist io___65 = { 0, 0, 0, fmt_9996, 0 };
00201 static cilist io___66 = { 0, 0, 0, fmt_9995, 0 };
00202 static cilist io___67 = { 0, 0, 0, fmt_9994, 0 };
00203 static cilist io___68 = { 0, 0, 0, fmt_9993, 0 };
00204 static cilist io___69 = { 0, 0, 0, fmt_9992, 0 };
00205 static cilist io___70 = { 0, 0, 0, fmt_9991, 0 };
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
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 --nn;
00576 --dotype;
00577 --iseed;
00578 p2_dim1 = *lda;
00579 p2_offset = 1 + p2_dim1;
00580 p2 -= p2_offset;
00581 p1_dim1 = *lda;
00582 p1_offset = 1 + p1_dim1;
00583 p1 -= p1_offset;
00584 s2_dim1 = *lda;
00585 s2_offset = 1 + s2_dim1;
00586 s2 -= s2_offset;
00587 s1_dim1 = *lda;
00588 s1_offset = 1 + s1_dim1;
00589 s1 -= s1_offset;
00590 t_dim1 = *lda;
00591 t_offset = 1 + t_dim1;
00592 t -= t_offset;
00593 h_dim1 = *lda;
00594 h_offset = 1 + h_dim1;
00595 h__ -= h_offset;
00596 b_dim1 = *lda;
00597 b_offset = 1 + b_dim1;
00598 b -= b_offset;
00599 a_dim1 = *lda;
00600 a_offset = 1 + a_dim1;
00601 a -= a_offset;
00602 evectr_dim1 = *ldu;
00603 evectr_offset = 1 + evectr_dim1;
00604 evectr -= evectr_offset;
00605 evectl_dim1 = *ldu;
00606 evectl_offset = 1 + evectl_dim1;
00607 evectl -= evectl_offset;
00608 z_dim1 = *ldu;
00609 z_offset = 1 + z_dim1;
00610 z__ -= z_offset;
00611 q_dim1 = *ldu;
00612 q_offset = 1 + q_dim1;
00613 q -= q_offset;
00614 v_dim1 = *ldu;
00615 v_offset = 1 + v_dim1;
00616 v -= v_offset;
00617 u_dim1 = *ldu;
00618 u_offset = 1 + u_dim1;
00619 u -= u_offset;
00620 --alpha1;
00621 --beta1;
00622 --alpha3;
00623 --beta3;
00624 --work;
00625 --rwork;
00626 --llwork;
00627 --result;
00628
00629
00630
00631
00632
00633
00634
00635 *info = 0;
00636
00637 badnn = FALSE_;
00638 nmax = 1;
00639 i__1 = *nsizes;
00640 for (j = 1; j <= i__1; ++j) {
00641
00642 i__2 = nmax, i__3 = nn[j];
00643 nmax = max(i__2,i__3);
00644 if (nn[j] < 0) {
00645 badnn = TRUE_;
00646 }
00647
00648 }
00649
00650
00651 i__1 = (nmax << 1) * nmax, i__2 = nmax << 2, i__1 = max(i__1,i__2);
00652 lwkopt = max(i__1,1);
00653
00654
00655
00656 if (*nsizes < 0) {
00657 *info = -1;
00658 } else if (badnn) {
00659 *info = -2;
00660 } else if (*ntypes < 0) {
00661 *info = -3;
00662 } else if (*thresh < 0.f) {
00663 *info = -6;
00664 } else if (*lda <= 1 || *lda < nmax) {
00665 *info = -10;
00666 } else if (*ldu <= 1 || *ldu < nmax) {
00667 *info = -19;
00668 } else if (lwkopt > *lwork) {
00669 *info = -30;
00670 }
00671
00672 if (*info != 0) {
00673 i__1 = -(*info);
00674 xerbla_("CCHKGG", &i__1);
00675 return 0;
00676 }
00677
00678
00679
00680 if (*nsizes == 0 || *ntypes == 0) {
00681 return 0;
00682 }
00683
00684 safmin = slamch_("Safe minimum");
00685 ulp = slamch_("Epsilon") * slamch_("Base");
00686 safmin /= ulp;
00687 safmax = 1.f / safmin;
00688 slabad_(&safmin, &safmax);
00689 ulpinv = 1.f / ulp;
00690
00691
00692
00693 rmagn[0] = 0.f;
00694 rmagn[1] = 1.f;
00695
00696
00697
00698 ntestt = 0;
00699 nerrs = 0;
00700 nmats = 0;
00701
00702 i__1 = *nsizes;
00703 for (jsize = 1; jsize <= i__1; ++jsize) {
00704 n = nn[jsize];
00705 n1 = max(1,n);
00706 rmagn[2] = safmax * ulp / (real) n1;
00707 rmagn[3] = safmin * ulpinv * n1;
00708
00709 if (*nsizes != 1) {
00710 mtypes = min(26,*ntypes);
00711 } else {
00712 mtypes = min(27,*ntypes);
00713 }
00714
00715 i__2 = mtypes;
00716 for (jtype = 1; jtype <= i__2; ++jtype) {
00717 if (! dotype[jtype]) {
00718 goto L230;
00719 }
00720 ++nmats;
00721 ntest = 0;
00722
00723
00724
00725 for (j = 1; j <= 4; ++j) {
00726 ioldsd[j - 1] = iseed[j];
00727
00728 }
00729
00730
00731
00732 for (j = 1; j <= 15; ++j) {
00733 result[j] = 0.f;
00734
00735 }
00736
00737
00738
00739
00740
00741
00742
00743
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754
00755
00756
00757
00758 if (mtypes > 26) {
00759 goto L110;
00760 }
00761 iinfo = 0;
00762 if (kclass[jtype - 1] < 3) {
00763
00764
00765
00766 if ((i__3 = katype[jtype - 1], abs(i__3)) == 3) {
00767 in = ((n - 1) / 2 << 1) + 1;
00768 if (in != n) {
00769 claset_("Full", &n, &n, &c_b1, &c_b1, &a[a_offset],
00770 lda);
00771 }
00772 } else {
00773 in = n;
00774 }
00775 clatm4_(&katype[jtype - 1], &in, &kz1[kazero[jtype - 1] - 1],
00776 &kz2[kazero[jtype - 1] - 1], &lasign[jtype - 1], &
00777 rmagn[kamagn[jtype - 1]], &ulp, &rmagn[ktrian[jtype -
00778 1] * kamagn[jtype - 1]], &c__4, &iseed[1], &a[
00779 a_offset], lda);
00780 iadd = kadd[kazero[jtype - 1] - 1];
00781 if (iadd > 0 && iadd <= n) {
00782 i__3 = iadd + iadd * a_dim1;
00783 i__4 = kamagn[jtype - 1];
00784 a[i__3].r = rmagn[i__4], a[i__3].i = 0.f;
00785 }
00786
00787
00788
00789 if ((i__3 = kbtype[jtype - 1], abs(i__3)) == 3) {
00790 in = ((n - 1) / 2 << 1) + 1;
00791 if (in != n) {
00792 claset_("Full", &n, &n, &c_b1, &c_b1, &b[b_offset],
00793 lda);
00794 }
00795 } else {
00796 in = n;
00797 }
00798 clatm4_(&kbtype[jtype - 1], &in, &kz1[kbzero[jtype - 1] - 1],
00799 &kz2[kbzero[jtype - 1] - 1], &lbsign[jtype - 1], &
00800 rmagn[kbmagn[jtype - 1]], &c_b17, &rmagn[ktrian[jtype
00801 - 1] * kbmagn[jtype - 1]], &c__4, &iseed[1], &b[
00802 b_offset], lda);
00803 iadd = kadd[kbzero[jtype - 1] - 1];
00804 if (iadd != 0) {
00805 i__3 = iadd + iadd * b_dim1;
00806 i__4 = kbmagn[jtype - 1];
00807 b[i__3].r = rmagn[i__4], b[i__3].i = 0.f;
00808 }
00809
00810 if (kclass[jtype - 1] == 2 && n > 0) {
00811
00812
00813
00814
00815
00816
00817
00818 i__3 = n - 1;
00819 for (jc = 1; jc <= i__3; ++jc) {
00820 i__4 = n;
00821 for (jr = jc; jr <= i__4; ++jr) {
00822 i__5 = jr + jc * u_dim1;
00823 clarnd_(&q__1, &c__3, &iseed[1]);
00824 u[i__5].r = q__1.r, u[i__5].i = q__1.i;
00825 i__5 = jr + jc * v_dim1;
00826 clarnd_(&q__1, &c__3, &iseed[1]);
00827 v[i__5].r = q__1.r, v[i__5].i = q__1.i;
00828
00829 }
00830 i__4 = n + 1 - jc;
00831 clarfg_(&i__4, &u[jc + jc * u_dim1], &u[jc + 1 + jc *
00832 u_dim1], &c__1, &work[jc]);
00833 i__4 = (n << 1) + jc;
00834 i__5 = jc + jc * u_dim1;
00835 r__2 = u[i__5].r;
00836 r__1 = r_sign(&c_b17, &r__2);
00837 work[i__4].r = r__1, work[i__4].i = 0.f;
00838 i__4 = jc + jc * u_dim1;
00839 u[i__4].r = 1.f, u[i__4].i = 0.f;
00840 i__4 = n + 1 - jc;
00841 clarfg_(&i__4, &v[jc + jc * v_dim1], &v[jc + 1 + jc *
00842 v_dim1], &c__1, &work[n + jc]);
00843 i__4 = n * 3 + jc;
00844 i__5 = jc + jc * v_dim1;
00845 r__2 = v[i__5].r;
00846 r__1 = r_sign(&c_b17, &r__2);
00847 work[i__4].r = r__1, work[i__4].i = 0.f;
00848 i__4 = jc + jc * v_dim1;
00849 v[i__4].r = 1.f, v[i__4].i = 0.f;
00850
00851 }
00852 clarnd_(&q__1, &c__3, &iseed[1]);
00853 ctemp.r = q__1.r, ctemp.i = q__1.i;
00854 i__3 = n + n * u_dim1;
00855 u[i__3].r = 1.f, u[i__3].i = 0.f;
00856 i__3 = n;
00857 work[i__3].r = 0.f, work[i__3].i = 0.f;
00858 i__3 = n * 3;
00859 r__1 = c_abs(&ctemp);
00860 q__1.r = ctemp.r / r__1, q__1.i = ctemp.i / r__1;
00861 work[i__3].r = q__1.r, work[i__3].i = q__1.i;
00862 clarnd_(&q__1, &c__3, &iseed[1]);
00863 ctemp.r = q__1.r, ctemp.i = q__1.i;
00864 i__3 = n + n * v_dim1;
00865 v[i__3].r = 1.f, v[i__3].i = 0.f;
00866 i__3 = n << 1;
00867 work[i__3].r = 0.f, work[i__3].i = 0.f;
00868 i__3 = n << 2;
00869 r__1 = c_abs(&ctemp);
00870 q__1.r = ctemp.r / r__1, q__1.i = ctemp.i / r__1;
00871 work[i__3].r = q__1.r, work[i__3].i = q__1.i;
00872
00873
00874
00875 i__3 = n;
00876 for (jc = 1; jc <= i__3; ++jc) {
00877 i__4 = n;
00878 for (jr = 1; jr <= i__4; ++jr) {
00879 i__5 = jr + jc * a_dim1;
00880 i__6 = (n << 1) + jr;
00881 r_cnjg(&q__3, &work[n * 3 + jc]);
00882 q__2.r = work[i__6].r * q__3.r - work[i__6].i *
00883 q__3.i, q__2.i = work[i__6].r * q__3.i +
00884 work[i__6].i * q__3.r;
00885 i__7 = jr + jc * a_dim1;
00886 q__1.r = q__2.r * a[i__7].r - q__2.i * a[i__7].i,
00887 q__1.i = q__2.r * a[i__7].i + q__2.i * a[
00888 i__7].r;
00889 a[i__5].r = q__1.r, a[i__5].i = q__1.i;
00890 i__5 = jr + jc * b_dim1;
00891 i__6 = (n << 1) + jr;
00892 r_cnjg(&q__3, &work[n * 3 + jc]);
00893 q__2.r = work[i__6].r * q__3.r - work[i__6].i *
00894 q__3.i, q__2.i = work[i__6].r * q__3.i +
00895 work[i__6].i * q__3.r;
00896 i__7 = jr + jc * b_dim1;
00897 q__1.r = q__2.r * b[i__7].r - q__2.i * b[i__7].i,
00898 q__1.i = q__2.r * b[i__7].i + q__2.i * b[
00899 i__7].r;
00900 b[i__5].r = q__1.r, b[i__5].i = q__1.i;
00901
00902 }
00903
00904 }
00905 i__3 = n - 1;
00906 cunm2r_("L", "N", &n, &n, &i__3, &u[u_offset], ldu, &work[
00907 1], &a[a_offset], lda, &work[(n << 1) + 1], &
00908 iinfo);
00909 if (iinfo != 0) {
00910 goto L100;
00911 }
00912 i__3 = n - 1;
00913 cunm2r_("R", "C", &n, &n, &i__3, &v[v_offset], ldu, &work[
00914 n + 1], &a[a_offset], lda, &work[(n << 1) + 1], &
00915 iinfo);
00916 if (iinfo != 0) {
00917 goto L100;
00918 }
00919 i__3 = n - 1;
00920 cunm2r_("L", "N", &n, &n, &i__3, &u[u_offset], ldu, &work[
00921 1], &b[b_offset], lda, &work[(n << 1) + 1], &
00922 iinfo);
00923 if (iinfo != 0) {
00924 goto L100;
00925 }
00926 i__3 = n - 1;
00927 cunm2r_("R", "C", &n, &n, &i__3, &v[v_offset], ldu, &work[
00928 n + 1], &b[b_offset], lda, &work[(n << 1) + 1], &
00929 iinfo);
00930 if (iinfo != 0) {
00931 goto L100;
00932 }
00933 }
00934 } else {
00935
00936
00937
00938 i__3 = n;
00939 for (jc = 1; jc <= i__3; ++jc) {
00940 i__4 = n;
00941 for (jr = 1; jr <= i__4; ++jr) {
00942 i__5 = jr + jc * a_dim1;
00943 i__6 = kamagn[jtype - 1];
00944 clarnd_(&q__2, &c__4, &iseed[1]);
00945 q__1.r = rmagn[i__6] * q__2.r, q__1.i = rmagn[i__6] *
00946 q__2.i;
00947 a[i__5].r = q__1.r, a[i__5].i = q__1.i;
00948 i__5 = jr + jc * b_dim1;
00949 i__6 = kbmagn[jtype - 1];
00950 clarnd_(&q__2, &c__4, &iseed[1]);
00951 q__1.r = rmagn[i__6] * q__2.r, q__1.i = rmagn[i__6] *
00952 q__2.i;
00953 b[i__5].r = q__1.r, b[i__5].i = q__1.i;
00954
00955 }
00956
00957 }
00958 }
00959
00960 anorm = clange_("1", &n, &n, &a[a_offset], lda, &rwork[1]);
00961 bnorm = clange_("1", &n, &n, &b[b_offset], lda, &rwork[1]);
00962
00963 L100:
00964
00965 if (iinfo != 0) {
00966 io___41.ciunit = *nounit;
00967 s_wsfe(&io___41);
00968 do_fio(&c__1, "Generator", (ftnlen)9);
00969 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00970 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00971 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
00972 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
00973 e_wsfe();
00974 *info = abs(iinfo);
00975 return 0;
00976 }
00977
00978 L110:
00979
00980
00981
00982 clacpy_(" ", &n, &n, &a[a_offset], lda, &h__[h_offset], lda);
00983 clacpy_(" ", &n, &n, &b[b_offset], lda, &t[t_offset], lda);
00984 ntest = 1;
00985 result[1] = ulpinv;
00986
00987 cgeqr2_(&n, &n, &t[t_offset], lda, &work[1], &work[n + 1], &iinfo)
00988 ;
00989 if (iinfo != 0) {
00990 io___42.ciunit = *nounit;
00991 s_wsfe(&io___42);
00992 do_fio(&c__1, "CGEQR2", (ftnlen)6);
00993 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00994 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00995 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
00996 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
00997 e_wsfe();
00998 *info = abs(iinfo);
00999 goto L210;
01000 }
01001
01002 cunm2r_("L", "C", &n, &n, &n, &t[t_offset], lda, &work[1], &h__[
01003 h_offset], lda, &work[n + 1], &iinfo);
01004 if (iinfo != 0) {
01005 io___43.ciunit = *nounit;
01006 s_wsfe(&io___43);
01007 do_fio(&c__1, "CUNM2R", (ftnlen)6);
01008 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01009 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01010 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01011 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01012 e_wsfe();
01013 *info = abs(iinfo);
01014 goto L210;
01015 }
01016
01017 claset_("Full", &n, &n, &c_b1, &c_b2, &u[u_offset], ldu);
01018 cunm2r_("R", "N", &n, &n, &n, &t[t_offset], lda, &work[1], &u[
01019 u_offset], ldu, &work[n + 1], &iinfo);
01020 if (iinfo != 0) {
01021 io___44.ciunit = *nounit;
01022 s_wsfe(&io___44);
01023 do_fio(&c__1, "CUNM2R", (ftnlen)6);
01024 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01025 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01026 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01027 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01028 e_wsfe();
01029 *info = abs(iinfo);
01030 goto L210;
01031 }
01032
01033 cgghrd_("V", "I", &n, &c__1, &n, &h__[h_offset], lda, &t[t_offset]
01034 , lda, &u[u_offset], ldu, &v[v_offset], ldu, &iinfo);
01035 if (iinfo != 0) {
01036 io___45.ciunit = *nounit;
01037 s_wsfe(&io___45);
01038 do_fio(&c__1, "CGGHRD", (ftnlen)6);
01039 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01040 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01041 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01042 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01043 e_wsfe();
01044 *info = abs(iinfo);
01045 goto L210;
01046 }
01047 ntest = 4;
01048
01049
01050
01051 cget51_(&c__1, &n, &a[a_offset], lda, &h__[h_offset], lda, &u[
01052 u_offset], ldu, &v[v_offset], ldu, &work[1], &rwork[1], &
01053 result[1]);
01054 cget51_(&c__1, &n, &b[b_offset], lda, &t[t_offset], lda, &u[
01055 u_offset], ldu, &v[v_offset], ldu, &work[1], &rwork[1], &
01056 result[2]);
01057 cget51_(&c__3, &n, &b[b_offset], lda, &t[t_offset], lda, &u[
01058 u_offset], ldu, &u[u_offset], ldu, &work[1], &rwork[1], &
01059 result[3]);
01060 cget51_(&c__3, &n, &b[b_offset], lda, &t[t_offset], lda, &v[
01061 v_offset], ldu, &v[v_offset], ldu, &work[1], &rwork[1], &
01062 result[4]);
01063
01064
01065
01066
01067
01068
01069
01070 clacpy_(" ", &n, &n, &h__[h_offset], lda, &s2[s2_offset], lda);
01071 clacpy_(" ", &n, &n, &t[t_offset], lda, &p2[p2_offset], lda);
01072 ntest = 5;
01073 result[5] = ulpinv;
01074
01075 chgeqz_("E", "N", "N", &n, &c__1, &n, &s2[s2_offset], lda, &p2[
01076 p2_offset], lda, &alpha3[1], &beta3[1], &q[q_offset], ldu,
01077 &z__[z_offset], ldu, &work[1], lwork, &rwork[1], &iinfo);
01078 if (iinfo != 0) {
01079 io___46.ciunit = *nounit;
01080 s_wsfe(&io___46);
01081 do_fio(&c__1, "CHGEQZ(E)", (ftnlen)9);
01082 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01083 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01084 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01085 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01086 e_wsfe();
01087 *info = abs(iinfo);
01088 goto L210;
01089 }
01090
01091
01092
01093 clacpy_(" ", &n, &n, &h__[h_offset], lda, &s2[s2_offset], lda);
01094 clacpy_(" ", &n, &n, &t[t_offset], lda, &p2[p2_offset], lda);
01095
01096 chgeqz_("S", "N", "N", &n, &c__1, &n, &s2[s2_offset], lda, &p2[
01097 p2_offset], lda, &alpha1[1], &beta1[1], &q[q_offset], ldu,
01098 &z__[z_offset], ldu, &work[1], lwork, &rwork[1], &iinfo);
01099 if (iinfo != 0) {
01100 io___47.ciunit = *nounit;
01101 s_wsfe(&io___47);
01102 do_fio(&c__1, "CHGEQZ(S)", (ftnlen)9);
01103 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01104 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01105 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01106 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01107 e_wsfe();
01108 *info = abs(iinfo);
01109 goto L210;
01110 }
01111
01112
01113
01114 clacpy_(" ", &n, &n, &h__[h_offset], lda, &s1[s1_offset], lda);
01115 clacpy_(" ", &n, &n, &t[t_offset], lda, &p1[p1_offset], lda);
01116
01117 chgeqz_("S", "I", "I", &n, &c__1, &n, &s1[s1_offset], lda, &p1[
01118 p1_offset], lda, &alpha1[1], &beta1[1], &q[q_offset], ldu,
01119 &z__[z_offset], ldu, &work[1], lwork, &rwork[1], &iinfo);
01120 if (iinfo != 0) {
01121 io___48.ciunit = *nounit;
01122 s_wsfe(&io___48);
01123 do_fio(&c__1, "CHGEQZ(V)", (ftnlen)9);
01124 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01125 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01126 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01127 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01128 e_wsfe();
01129 *info = abs(iinfo);
01130 goto L210;
01131 }
01132
01133 ntest = 8;
01134
01135
01136
01137 cget51_(&c__1, &n, &h__[h_offset], lda, &s1[s1_offset], lda, &q[
01138 q_offset], ldu, &z__[z_offset], ldu, &work[1], &rwork[1],
01139 &result[5]);
01140 cget51_(&c__1, &n, &t[t_offset], lda, &p1[p1_offset], lda, &q[
01141 q_offset], ldu, &z__[z_offset], ldu, &work[1], &rwork[1],
01142 &result[6]);
01143 cget51_(&c__3, &n, &t[t_offset], lda, &p1[p1_offset], lda, &q[
01144 q_offset], ldu, &q[q_offset], ldu, &work[1], &rwork[1], &
01145 result[7]);
01146 cget51_(&c__3, &n, &t[t_offset], lda, &p1[p1_offset], lda, &z__[
01147 z_offset], ldu, &z__[z_offset], ldu, &work[1], &rwork[1],
01148 &result[8]);
01149
01150
01151
01152
01153
01154
01155 ntest = 9;
01156 result[9] = ulpinv;
01157
01158
01159
01160
01161 i1 = n / 2;
01162 i__3 = i1;
01163 for (j = 1; j <= i__3; ++j) {
01164 llwork[j] = TRUE_;
01165
01166 }
01167 i__3 = n;
01168 for (j = i1 + 1; j <= i__3; ++j) {
01169 llwork[j] = FALSE_;
01170
01171 }
01172
01173 ctgevc_("L", "S", &llwork[1], &n, &s1[s1_offset], lda, &p1[
01174 p1_offset], lda, &evectl[evectl_offset], ldu, cdumma, ldu,
01175 &n, &in, &work[1], &rwork[1], &iinfo);
01176 if (iinfo != 0) {
01177 io___51.ciunit = *nounit;
01178 s_wsfe(&io___51);
01179 do_fio(&c__1, "CTGEVC(L,S1)", (ftnlen)12);
01180 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01181 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01182 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01183 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01184 e_wsfe();
01185 *info = abs(iinfo);
01186 goto L210;
01187 }
01188
01189 i1 = in;
01190 i__3 = i1;
01191 for (j = 1; j <= i__3; ++j) {
01192 llwork[j] = FALSE_;
01193
01194 }
01195 i__3 = n;
01196 for (j = i1 + 1; j <= i__3; ++j) {
01197 llwork[j] = TRUE_;
01198
01199 }
01200
01201 ctgevc_("L", "S", &llwork[1], &n, &s1[s1_offset], lda, &p1[
01202 p1_offset], lda, &evectl[(i1 + 1) * evectl_dim1 + 1], ldu,
01203 cdumma, ldu, &n, &in, &work[1], &rwork[1], &iinfo);
01204 if (iinfo != 0) {
01205 io___52.ciunit = *nounit;
01206 s_wsfe(&io___52);
01207 do_fio(&c__1, "CTGEVC(L,S2)", (ftnlen)12);
01208 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01209 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01210 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01211 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01212 e_wsfe();
01213 *info = abs(iinfo);
01214 goto L210;
01215 }
01216
01217 cget52_(&c_true, &n, &s1[s1_offset], lda, &p1[p1_offset], lda, &
01218 evectl[evectl_offset], ldu, &alpha1[1], &beta1[1], &work[
01219 1], &rwork[1], dumma);
01220 result[9] = dumma[0];
01221 if (dumma[1] > *thrshn) {
01222 io___54.ciunit = *nounit;
01223 s_wsfe(&io___54);
01224 do_fio(&c__1, "Left", (ftnlen)4);
01225 do_fio(&c__1, "CTGEVC(HOWMNY=S)", (ftnlen)16);
01226 do_fio(&c__1, (char *)&dumma[1], (ftnlen)sizeof(real));
01227 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01228 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01229 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01230 e_wsfe();
01231 }
01232
01233
01234
01235
01236 ntest = 10;
01237 result[10] = ulpinv;
01238 clacpy_("F", &n, &n, &q[q_offset], ldu, &evectl[evectl_offset],
01239 ldu);
01240 ctgevc_("L", "B", &llwork[1], &n, &s1[s1_offset], lda, &p1[
01241 p1_offset], lda, &evectl[evectl_offset], ldu, cdumma, ldu,
01242 &n, &in, &work[1], &rwork[1], &iinfo);
01243 if (iinfo != 0) {
01244 io___55.ciunit = *nounit;
01245 s_wsfe(&io___55);
01246 do_fio(&c__1, "CTGEVC(L,B)", (ftnlen)11);
01247 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01248 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01249 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01250 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01251 e_wsfe();
01252 *info = abs(iinfo);
01253 goto L210;
01254 }
01255
01256 cget52_(&c_true, &n, &h__[h_offset], lda, &t[t_offset], lda, &
01257 evectl[evectl_offset], ldu, &alpha1[1], &beta1[1], &work[
01258 1], &rwork[1], dumma);
01259 result[10] = dumma[0];
01260 if (dumma[1] > *thrshn) {
01261 io___56.ciunit = *nounit;
01262 s_wsfe(&io___56);
01263 do_fio(&c__1, "Left", (ftnlen)4);
01264 do_fio(&c__1, "CTGEVC(HOWMNY=B)", (ftnlen)16);
01265 do_fio(&c__1, (char *)&dumma[1], (ftnlen)sizeof(real));
01266 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01267 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01268 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01269 e_wsfe();
01270 }
01271
01272
01273
01274
01275 ntest = 11;
01276 result[11] = ulpinv;
01277
01278
01279
01280
01281 i1 = n / 2;
01282 i__3 = i1;
01283 for (j = 1; j <= i__3; ++j) {
01284 llwork[j] = TRUE_;
01285
01286 }
01287 i__3 = n;
01288 for (j = i1 + 1; j <= i__3; ++j) {
01289 llwork[j] = FALSE_;
01290
01291 }
01292
01293 ctgevc_("R", "S", &llwork[1], &n, &s1[s1_offset], lda, &p1[
01294 p1_offset], lda, cdumma, ldu, &evectr[evectr_offset], ldu,
01295 &n, &in, &work[1], &rwork[1], &iinfo);
01296 if (iinfo != 0) {
01297 io___57.ciunit = *nounit;
01298 s_wsfe(&io___57);
01299 do_fio(&c__1, "CTGEVC(R,S1)", (ftnlen)12);
01300 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01301 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01302 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01303 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01304 e_wsfe();
01305 *info = abs(iinfo);
01306 goto L210;
01307 }
01308
01309 i1 = in;
01310 i__3 = i1;
01311 for (j = 1; j <= i__3; ++j) {
01312 llwork[j] = FALSE_;
01313
01314 }
01315 i__3 = n;
01316 for (j = i1 + 1; j <= i__3; ++j) {
01317 llwork[j] = TRUE_;
01318
01319 }
01320
01321 ctgevc_("R", "S", &llwork[1], &n, &s1[s1_offset], lda, &p1[
01322 p1_offset], lda, cdumma, ldu, &evectr[(i1 + 1) *
01323 evectr_dim1 + 1], ldu, &n, &in, &work[1], &rwork[1], &
01324 iinfo);
01325 if (iinfo != 0) {
01326 io___58.ciunit = *nounit;
01327 s_wsfe(&io___58);
01328 do_fio(&c__1, "CTGEVC(R,S2)", (ftnlen)12);
01329 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01330 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01331 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01332 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01333 e_wsfe();
01334 *info = abs(iinfo);
01335 goto L210;
01336 }
01337
01338 cget52_(&c_false, &n, &s1[s1_offset], lda, &p1[p1_offset], lda, &
01339 evectr[evectr_offset], ldu, &alpha1[1], &beta1[1], &work[
01340 1], &rwork[1], dumma);
01341 result[11] = dumma[0];
01342 if (dumma[1] > *thresh) {
01343 io___59.ciunit = *nounit;
01344 s_wsfe(&io___59);
01345 do_fio(&c__1, "Right", (ftnlen)5);
01346 do_fio(&c__1, "CTGEVC(HOWMNY=S)", (ftnlen)16);
01347 do_fio(&c__1, (char *)&dumma[1], (ftnlen)sizeof(real));
01348 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01349 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01350 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01351 e_wsfe();
01352 }
01353
01354
01355
01356
01357 ntest = 12;
01358 result[12] = ulpinv;
01359 clacpy_("F", &n, &n, &z__[z_offset], ldu, &evectr[evectr_offset],
01360 ldu);
01361 ctgevc_("R", "B", &llwork[1], &n, &s1[s1_offset], lda, &p1[
01362 p1_offset], lda, cdumma, ldu, &evectr[evectr_offset], ldu,
01363 &n, &in, &work[1], &rwork[1], &iinfo);
01364 if (iinfo != 0) {
01365 io___60.ciunit = *nounit;
01366 s_wsfe(&io___60);
01367 do_fio(&c__1, "CTGEVC(R,B)", (ftnlen)11);
01368 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01369 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01370 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01371 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01372 e_wsfe();
01373 *info = abs(iinfo);
01374 goto L210;
01375 }
01376
01377 cget52_(&c_false, &n, &h__[h_offset], lda, &t[t_offset], lda, &
01378 evectr[evectr_offset], ldu, &alpha1[1], &beta1[1], &work[
01379 1], &rwork[1], dumma);
01380 result[12] = dumma[0];
01381 if (dumma[1] > *thresh) {
01382 io___61.ciunit = *nounit;
01383 s_wsfe(&io___61);
01384 do_fio(&c__1, "Right", (ftnlen)5);
01385 do_fio(&c__1, "CTGEVC(HOWMNY=B)", (ftnlen)16);
01386 do_fio(&c__1, (char *)&dumma[1], (ftnlen)sizeof(real));
01387 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01388 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01389 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
01390 e_wsfe();
01391 }
01392
01393
01394
01395 if (*tstdif) {
01396
01397
01398
01399 cget51_(&c__2, &n, &s1[s1_offset], lda, &s2[s2_offset], lda, &
01400 q[q_offset], ldu, &z__[z_offset], ldu, &work[1], &
01401 rwork[1], &result[13]);
01402 cget51_(&c__2, &n, &p1[p1_offset], lda, &p2[p2_offset], lda, &
01403 q[q_offset], ldu, &z__[z_offset], ldu, &work[1], &
01404 rwork[1], &result[14]);
01405
01406
01407
01408 temp1 = 0.f;
01409 temp2 = 0.f;
01410 i__3 = n;
01411 for (j = 1; j <= i__3; ++j) {
01412
01413 i__4 = j;
01414 i__5 = j;
01415 q__1.r = alpha1[i__4].r - alpha3[i__5].r, q__1.i = alpha1[
01416 i__4].i - alpha3[i__5].i;
01417 r__1 = temp1, r__2 = c_abs(&q__1);
01418 temp1 = dmax(r__1,r__2);
01419
01420 i__4 = j;
01421 i__5 = j;
01422 q__1.r = beta1[i__4].r - beta3[i__5].r, q__1.i = beta1[
01423 i__4].i - beta3[i__5].i;
01424 r__1 = temp2, r__2 = c_abs(&q__1);
01425 temp2 = dmax(r__1,r__2);
01426
01427 }
01428
01429
01430 r__1 = safmin, r__2 = ulp * dmax(temp1,anorm);
01431 temp1 /= dmax(r__1,r__2);
01432
01433 r__1 = safmin, r__2 = ulp * dmax(temp2,bnorm);
01434 temp2 /= dmax(r__1,r__2);
01435 result[15] = dmax(temp1,temp2);
01436 ntest = 15;
01437 } else {
01438 result[13] = 0.f;
01439 result[14] = 0.f;
01440 result[15] = 0.f;
01441 ntest = 12;
01442 }
01443
01444
01445
01446 L210:
01447
01448 ntestt += ntest;
01449
01450
01451
01452 i__3 = ntest;
01453 for (jr = 1; jr <= i__3; ++jr) {
01454 if (result[jr] >= *thresh) {
01455
01456
01457
01458
01459 if (nerrs == 0) {
01460 io___64.ciunit = *nounit;
01461 s_wsfe(&io___64);
01462 do_fio(&c__1, "CGG", (ftnlen)3);
01463 e_wsfe();
01464
01465
01466
01467 io___65.ciunit = *nounit;
01468 s_wsfe(&io___65);
01469 e_wsfe();
01470 io___66.ciunit = *nounit;
01471 s_wsfe(&io___66);
01472 e_wsfe();
01473 io___67.ciunit = *nounit;
01474 s_wsfe(&io___67);
01475 do_fio(&c__1, "Unitary", (ftnlen)7);
01476 e_wsfe();
01477
01478
01479
01480 io___68.ciunit = *nounit;
01481 s_wsfe(&io___68);
01482 do_fio(&c__1, "unitary", (ftnlen)7);
01483 do_fio(&c__1, "*", (ftnlen)1);
01484 do_fio(&c__1, "conjugate transpose", (ftnlen)19);
01485 for (j = 1; j <= 10; ++j) {
01486 do_fio(&c__1, "*", (ftnlen)1);
01487 }
01488 e_wsfe();
01489
01490 }
01491 ++nerrs;
01492 if (result[jr] < 1e4f) {
01493 io___69.ciunit = *nounit;
01494 s_wsfe(&io___69);
01495 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01496 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer))
01497 ;
01498 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
01499 integer));
01500 do_fio(&c__1, (char *)&jr, (ftnlen)sizeof(integer));
01501 do_fio(&c__1, (char *)&result[jr], (ftnlen)sizeof(
01502 real));
01503 e_wsfe();
01504 } else {
01505 io___70.ciunit = *nounit;
01506 s_wsfe(&io___70);
01507 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01508 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer))
01509 ;
01510 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
01511 integer));
01512 do_fio(&c__1, (char *)&jr, (ftnlen)sizeof(integer));
01513 do_fio(&c__1, (char *)&result[jr], (ftnlen)sizeof(
01514 real));
01515 e_wsfe();
01516 }
01517 }
01518
01519 }
01520
01521 L230:
01522 ;
01523 }
01524
01525 }
01526
01527
01528
01529 slasum_("CGG", nounit, &nerrs, &ntestt);
01530 return 0;
01531
01532
01533
01534
01535
01536
01537
01538
01539
01540
01541 }