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