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