cget24.c
Go to the documentation of this file.
00001 /* cget24.f -- translated by f2c (version 20061008).
00002    You must link the resulting object file with libf2c:
00003         on Microsoft Windows system, link with libf2c.lib;
00004         on Linux or Unix systems, link with .../path/to/libf2c.a -lm
00005         or, if you install libf2c.a in a standard place, with -lf2c -lm
00006         -- in that order, at the end of the command line, as in
00007                 cc *.o -lf2c -lm
00008         Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
00009 
00010                 http://www.netlib.org/f2c/libf2c.zip
00011 */
00012 
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015 
00016 /* Common Block Declarations */
00017 
00018 struct {
00019     integer selopt, seldim;
00020     logical selval[20];
00021     real selwr[20], selwi[20];
00022 } sslct_;
00023 
00024 #define sslct_1 sslct_
00025 
00026 /* Table of constant values */
00027 
00028 static complex c_b1 = {0.f,0.f};
00029 static complex c_b2 = {1.f,0.f};
00030 static integer c__1 = 1;
00031 static integer c__4 = 4;
00032 
00033 /* Subroutine */ int cget24_(logical *comp, integer *jtype, real *thresh, 
00034         integer *iseed, integer *nounit, integer *n, complex *a, integer *lda, 
00035          complex *h__, complex *ht, complex *w, complex *wt, complex *wtmp, 
00036         complex *vs, integer *ldvs, complex *vs1, real *rcdein, real *rcdvin, 
00037         integer *nslct, integer *islct, integer *isrt, real *result, complex *
00038         work, integer *lwork, real *rwork, logical *bwork, integer *info)
00039 {
00040     /* Format strings */
00041     static char fmt_9998[] = "(\002 CGET24: \002,a,\002 returned INFO=\002,i"
00042             "6,\002.\002,/9x,\002N=\002,i6,\002, JTYPE=\002,i6,\002, ISEED="
00043             "(\002,3(i5,\002,\002),i5,\002)\002)";
00044     static char fmt_9999[] = "(\002 CGET24: \002,a,\002 returned INFO=\002,i"
00045             "6,\002.\002,/9x,\002N=\002,i6,\002, INPUT EXAMPLE NUMBER = \002,"
00046             "i4)";
00047 
00048     /* System generated locals */
00049     integer a_dim1, a_offset, h_dim1, h_offset, ht_dim1, ht_offset, vs_dim1, 
00050             vs_offset, vs1_dim1, vs1_offset, i__1, i__2, i__3, i__4;
00051     real r__1, r__2;
00052     complex q__1;
00053 
00054     /* Builtin functions */
00055     integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00056     double r_imag(complex *);
00057 
00058     /* Local variables */
00059     integer i__, j;
00060     real v, eps, tol, ulp;
00061     integer sdim, kmin;
00062     complex ctmp;
00063     integer itmp, ipnt[20], rsub;
00064     char sort[1];
00065     integer sdim1;
00066     extern /* Subroutine */ int cgemm_(char *, char *, integer *, integer *, 
00067             integer *, complex *, complex *, integer *, complex *, integer *, 
00068             complex *, complex *, integer *);
00069     integer iinfo;
00070     extern /* Subroutine */ int cunt01_(char *, integer *, integer *, complex 
00071             *, integer *, complex *, integer *, real *, real *);
00072     real anorm;
00073     extern /* Subroutine */ int ccopy_(integer *, complex *, integer *, 
00074             complex *, integer *);
00075     real tolin;
00076     integer isort;
00077     real wnorm, rcnde1, rcndv1;
00078     extern doublereal clange_(char *, integer *, integer *, complex *, 
00079             integer *, real *), slamch_(char *);
00080     real rconde;
00081     extern /* Subroutine */ int clacpy_(char *, integer *, integer *, complex 
00082             *, integer *, complex *, integer *);
00083     extern logical cslect_(complex *);
00084     extern /* Subroutine */ int cgeesx_(char *, char *, L_fp, char *, integer 
00085             *, complex *, integer *, integer *, complex *, complex *, integer 
00086             *, real *, real *, complex *, integer *, real *, logical *, 
00087             integer *), xerbla_(char *, integer *);
00088     integer knteig;
00089     real rcondv, vricmp, vrimin, smlnum, ulpinv;
00090 
00091     /* Fortran I/O blocks */
00092     static cilist io___12 = { 0, 0, 0, fmt_9998, 0 };
00093     static cilist io___13 = { 0, 0, 0, fmt_9999, 0 };
00094     static cilist io___17 = { 0, 0, 0, fmt_9998, 0 };
00095     static cilist io___18 = { 0, 0, 0, fmt_9999, 0 };
00096     static cilist io___21 = { 0, 0, 0, fmt_9998, 0 };
00097     static cilist io___22 = { 0, 0, 0, fmt_9999, 0 };
00098     static cilist io___25 = { 0, 0, 0, fmt_9998, 0 };
00099     static cilist io___26 = { 0, 0, 0, fmt_9999, 0 };
00100     static cilist io___27 = { 0, 0, 0, fmt_9998, 0 };
00101     static cilist io___28 = { 0, 0, 0, fmt_9999, 0 };
00102     static cilist io___29 = { 0, 0, 0, fmt_9998, 0 };
00103     static cilist io___30 = { 0, 0, 0, fmt_9999, 0 };
00104     static cilist io___31 = { 0, 0, 0, fmt_9998, 0 };
00105     static cilist io___32 = { 0, 0, 0, fmt_9999, 0 };
00106     static cilist io___33 = { 0, 0, 0, fmt_9998, 0 };
00107     static cilist io___34 = { 0, 0, 0, fmt_9999, 0 };
00108     static cilist io___42 = { 0, 0, 0, fmt_9999, 0 };
00109 
00110 
00111 
00112 /*  -- LAPACK test routine (version 3.1) -- */
00113 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00114 /*     November 2006 */
00115 
00116 /*     .. Scalar Arguments .. */
00117 /*     .. */
00118 /*     .. Array Arguments .. */
00119 /*     .. */
00120 
00121 /*  Purpose */
00122 /*  ======= */
00123 
00124 /*     CGET24 checks the nonsymmetric eigenvalue (Schur form) problem */
00125 /*     expert driver CGEESX. */
00126 
00127 /*     If COMP = .FALSE., the first 13 of the following tests will be */
00128 /*     be performed on the input matrix A, and also tests 14 and 15 */
00129 /*     if LWORK is sufficiently large. */
00130 /*     If COMP = .TRUE., all 17 test will be performed. */
00131 
00132 /*     (1)     0 if T is in Schur form, 1/ulp otherwise */
00133 /*            (no sorting of eigenvalues) */
00134 
00135 /*     (2)     | A - VS T VS' | / ( n |A| ulp ) */
00136 
00137 /*       Here VS is the matrix of Schur eigenvectors, and T is in Schur */
00138 /*       form  (no sorting of eigenvalues). */
00139 
00140 /*     (3)     | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues). */
00141 
00142 /*     (4)     0     if W are eigenvalues of T */
00143 /*             1/ulp otherwise */
00144 /*             (no sorting of eigenvalues) */
00145 
00146 /*     (5)     0     if T(with VS) = T(without VS), */
00147 /*             1/ulp otherwise */
00148 /*             (no sorting of eigenvalues) */
00149 
00150 /*     (6)     0     if eigenvalues(with VS) = eigenvalues(without VS), */
00151 /*             1/ulp otherwise */
00152 /*             (no sorting of eigenvalues) */
00153 
00154 /*     (7)     0 if T is in Schur form, 1/ulp otherwise */
00155 /*             (with sorting of eigenvalues) */
00156 
00157 /*     (8)     | A - VS T VS' | / ( n |A| ulp ) */
00158 
00159 /*       Here VS is the matrix of Schur eigenvectors, and T is in Schur */
00160 /*       form  (with sorting of eigenvalues). */
00161 
00162 /*     (9)     | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues). */
00163 
00164 /*     (10)    0     if W are eigenvalues of T */
00165 /*             1/ulp otherwise */
00166 /*             If workspace sufficient, also compare W with and */
00167 /*             without reciprocal condition numbers */
00168 /*             (with sorting of eigenvalues) */
00169 
00170 /*     (11)    0     if T(with VS) = T(without VS), */
00171 /*             1/ulp otherwise */
00172 /*             If workspace sufficient, also compare T with and without */
00173 /*             reciprocal condition numbers */
00174 /*             (with sorting of eigenvalues) */
00175 
00176 /*     (12)    0     if eigenvalues(with VS) = eigenvalues(without VS), */
00177 /*             1/ulp otherwise */
00178 /*             If workspace sufficient, also compare VS with and without */
00179 /*             reciprocal condition numbers */
00180 /*             (with sorting of eigenvalues) */
00181 
00182 /*     (13)    if sorting worked and SDIM is the number of */
00183 /*             eigenvalues which were SELECTed */
00184 /*             If workspace sufficient, also compare SDIM with and */
00185 /*             without reciprocal condition numbers */
00186 
00187 /*     (14)    if RCONDE the same no matter if VS and/or RCONDV computed */
00188 
00189 /*     (15)    if RCONDV the same no matter if VS and/or RCONDE computed */
00190 
00191 /*     (16)  |RCONDE - RCDEIN| / cond(RCONDE) */
00192 
00193 /*        RCONDE is the reciprocal average eigenvalue condition number */
00194 /*        computed by CGEESX and RCDEIN (the precomputed true value) */
00195 /*        is supplied as input.  cond(RCONDE) is the condition number */
00196 /*        of RCONDE, and takes errors in computing RCONDE into account, */
00197 /*        so that the resulting quantity should be O(ULP). cond(RCONDE) */
00198 /*        is essentially given by norm(A)/RCONDV. */
00199 
00200 /*     (17)  |RCONDV - RCDVIN| / cond(RCONDV) */
00201 
00202 /*        RCONDV is the reciprocal right invariant subspace condition */
00203 /*        number computed by CGEESX and RCDVIN (the precomputed true */
00204 /*        value) is supplied as input. cond(RCONDV) is the condition */
00205 /*        number of RCONDV, and takes errors in computing RCONDV into */
00206 /*        account, so that the resulting quantity should be O(ULP). */
00207 /*        cond(RCONDV) is essentially given by norm(A)/RCONDE. */
00208 
00209 /*  Arguments */
00210 /*  ========= */
00211 
00212 /*  COMP    (input) LOGICAL */
00213 /*          COMP describes which input tests to perform: */
00214 /*            = .FALSE. if the computed condition numbers are not to */
00215 /*                      be tested against RCDVIN and RCDEIN */
00216 /*            = .TRUE.  if they are to be compared */
00217 
00218 /*  JTYPE   (input) INTEGER */
00219 /*          Type of input matrix. Used to label output if error occurs. */
00220 
00221 /*  ISEED   (input) INTEGER array, dimension (4) */
00222 /*          If COMP = .FALSE., the random number generator seed */
00223 /*          used to produce matrix. */
00224 /*          If COMP = .TRUE., ISEED(1) = the number of the example. */
00225 /*          Used to label output if error occurs. */
00226 
00227 /*  THRESH  (input) REAL */
00228 /*          A test will count as "failed" if the "error", computed as */
00229 /*          described above, exceeds THRESH.  Note that the error */
00230 /*          is scaled to be O(1), so THRESH should be a reasonably */
00231 /*          small multiple of 1, e.g., 10 or 100.  In particular, */
00232 /*          it should not depend on the precision (single vs. double) */
00233 /*          or the size of the matrix.  It must be at least zero. */
00234 
00235 /*  NOUNIT  (input) INTEGER */
00236 /*          The FORTRAN unit number for printing out error messages */
00237 /*          (e.g., if a routine returns INFO not equal to 0.) */
00238 
00239 /*  N       (input) INTEGER */
00240 /*          The dimension of A. N must be at least 0. */
00241 
00242 /*  A       (input/output) COMPLEX array, dimension (LDA, N) */
00243 /*          Used to hold the matrix whose eigenvalues are to be */
00244 /*          computed. */
00245 
00246 /*  LDA     (input) INTEGER */
00247 /*          The leading dimension of A, and H. LDA must be at */
00248 /*          least 1 and at least N. */
00249 
00250 /*  H       (workspace) COMPLEX array, dimension (LDA, N) */
00251 /*          Another copy of the test matrix A, modified by CGEESX. */
00252 
00253 /*  HT      (workspace) COMPLEX array, dimension (LDA, N) */
00254 /*          Yet another copy of the test matrix A, modified by CGEESX. */
00255 
00256 /*  W       (workspace) COMPLEX array, dimension (N) */
00257 /*          The computed eigenvalues of A. */
00258 
00259 /*  WT      (workspace) COMPLEX array, dimension (N) */
00260 /*          Like W, this array contains the eigenvalues of A, */
00261 /*          but those computed when CGEESX only computes a partial */
00262 /*          eigendecomposition, i.e. not Schur vectors */
00263 
00264 /*  WTMP    (workspace) COMPLEX array, dimension (N) */
00265 /*          Like W, this array contains the eigenvalues of A, */
00266 /*          but sorted by increasing real or imaginary part. */
00267 
00268 /*  VS      (workspace) COMPLEX array, dimension (LDVS, N) */
00269 /*          VS holds the computed Schur vectors. */
00270 
00271 /*  LDVS    (input) INTEGER */
00272 /*          Leading dimension of VS. Must be at least max(1, N). */
00273 
00274 /*  VS1     (workspace) COMPLEX array, dimension (LDVS, N) */
00275 /*          VS1 holds another copy of the computed Schur vectors. */
00276 
00277 /*  RCDEIN  (input) REAL */
00278 /*          When COMP = .TRUE. RCDEIN holds the precomputed reciprocal */
00279 /*          condition number for the average of selected eigenvalues. */
00280 
00281 /*  RCDVIN  (input) REAL */
00282 /*          When COMP = .TRUE. RCDVIN holds the precomputed reciprocal */
00283 /*          condition number for the selected right invariant subspace. */
00284 
00285 /*  NSLCT   (input) INTEGER */
00286 /*          When COMP = .TRUE. the number of selected eigenvalues */
00287 /*          corresponding to the precomputed values RCDEIN and RCDVIN. */
00288 
00289 /*  ISLCT   (input) INTEGER array, dimension (NSLCT) */
00290 /*          When COMP = .TRUE. ISLCT selects the eigenvalues of the */
00291 /*          input matrix corresponding to the precomputed values RCDEIN */
00292 /*          and RCDVIN. For I=1, ... ,NSLCT, if ISLCT(I) = J, then the */
00293 /*          eigenvalue with the J-th largest real or imaginary part is */
00294 /*          selected. The real part is used if ISRT = 0, and the */
00295 /*          imaginary part if ISRT = 1. */
00296 /*          Not referenced if COMP = .FALSE. */
00297 
00298 /*  ISRT    (input) INTEGER */
00299 /*          When COMP = .TRUE., ISRT describes how ISLCT is used to */
00300 /*          choose a subset of the spectrum. */
00301 /*          Not referenced if COMP = .FALSE. */
00302 
00303 /*  RESULT  (output) REAL array, dimension (17) */
00304 /*          The values computed by the 17 tests described above. */
00305 /*          The values are currently limited to 1/ulp, to avoid */
00306 /*          overflow. */
00307 
00308 /*  WORK    (workspace) COMPLEX array, dimension (2*N*N) */
00309 
00310 /*  LWORK   (input) INTEGER */
00311 /*          The number of entries in WORK to be passed to CGEESX. This */
00312 /*          must be at least 2*N, and N*(N+1)/2 if tests 14--16 are to */
00313 /*          be performed. */
00314 
00315 /*  RWORK   (workspace) REAL array, dimension (N) */
00316 
00317 /*  BWORK   (workspace) LOGICAL array, dimension (N) */
00318 
00319 /*  INFO    (output) INTEGER */
00320 /*          If 0,  successful exit. */
00321 /*          If <0, input parameter -INFO had an incorrect value. */
00322 /*          If >0, CGEESX returned an error code, the absolute */
00323 /*                 value of which is returned. */
00324 
00325 /*  ===================================================================== */
00326 
00327 /*     .. Parameters .. */
00328 /*     .. */
00329 /*     .. Local Scalars .. */
00330 /*     .. */
00331 /*     .. Local Arrays .. */
00332 /*     .. */
00333 /*     .. External Functions .. */
00334 /*     .. */
00335 /*     .. External Subroutines .. */
00336 /*     .. */
00337 /*     .. Intrinsic Functions .. */
00338 /*     .. */
00339 /*     .. Arrays in Common .. */
00340 /*     .. */
00341 /*     .. Scalars in Common .. */
00342 /*     .. */
00343 /*     .. Common blocks .. */
00344 /*     .. */
00345 /*     .. Executable Statements .. */
00346 
00347 /*     Check for errors */
00348 
00349     /* Parameter adjustments */
00350     --iseed;
00351     ht_dim1 = *lda;
00352     ht_offset = 1 + ht_dim1;
00353     ht -= ht_offset;
00354     h_dim1 = *lda;
00355     h_offset = 1 + h_dim1;
00356     h__ -= h_offset;
00357     a_dim1 = *lda;
00358     a_offset = 1 + a_dim1;
00359     a -= a_offset;
00360     --w;
00361     --wt;
00362     --wtmp;
00363     vs1_dim1 = *ldvs;
00364     vs1_offset = 1 + vs1_dim1;
00365     vs1 -= vs1_offset;
00366     vs_dim1 = *ldvs;
00367     vs_offset = 1 + vs_dim1;
00368     vs -= vs_offset;
00369     --islct;
00370     --result;
00371     --work;
00372     --rwork;
00373     --bwork;
00374 
00375     /* Function Body */
00376     *info = 0;
00377     if (*thresh < 0.f) {
00378         *info = -3;
00379     } else if (*nounit <= 0) {
00380         *info = -5;
00381     } else if (*n < 0) {
00382         *info = -6;
00383     } else if (*lda < 1 || *lda < *n) {
00384         *info = -8;
00385     } else if (*ldvs < 1 || *ldvs < *n) {
00386         *info = -15;
00387     } else if (*lwork < *n << 1) {
00388         *info = -24;
00389     }
00390 
00391     if (*info != 0) {
00392         i__1 = -(*info);
00393         xerbla_("CGET24", &i__1);
00394         return 0;
00395     }
00396 
00397 /*     Quick return if nothing to do */
00398 
00399     for (i__ = 1; i__ <= 17; ++i__) {
00400         result[i__] = -1.f;
00401 /* L10: */
00402     }
00403 
00404     if (*n == 0) {
00405         return 0;
00406     }
00407 
00408 /*     Important constants */
00409 
00410     smlnum = slamch_("Safe minimum");
00411     ulp = slamch_("Precision");
00412     ulpinv = 1.f / ulp;
00413 
00414 /*     Perform tests (1)-(13) */
00415 
00416     sslct_1.selopt = 0;
00417     for (isort = 0; isort <= 1; ++isort) {
00418         if (isort == 0) {
00419             *(unsigned char *)sort = 'N';
00420             rsub = 0;
00421         } else {
00422             *(unsigned char *)sort = 'S';
00423             rsub = 6;
00424         }
00425 
00426 /*        Compute Schur form and Schur vectors, and test them */
00427 
00428         clacpy_("F", n, n, &a[a_offset], lda, &h__[h_offset], lda);
00429         cgeesx_("V", sort, (L_fp)cslect_, "N", n, &h__[h_offset], lda, &sdim, 
00430                 &w[1], &vs[vs_offset], ldvs, &rconde, &rcondv, &work[1], 
00431                 lwork, &rwork[1], &bwork[1], &iinfo);
00432         if (iinfo != 0) {
00433             result[rsub + 1] = ulpinv;
00434             if (*jtype != 22) {
00435                 io___12.ciunit = *nounit;
00436                 s_wsfe(&io___12);
00437                 do_fio(&c__1, "CGEESX1", (ftnlen)7);
00438                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00439                 do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
00440                 do_fio(&c__1, (char *)&(*jtype), (ftnlen)sizeof(integer));
00441                 do_fio(&c__4, (char *)&iseed[1], (ftnlen)sizeof(integer));
00442                 e_wsfe();
00443             } else {
00444                 io___13.ciunit = *nounit;
00445                 s_wsfe(&io___13);
00446                 do_fio(&c__1, "CGEESX1", (ftnlen)7);
00447                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00448                 do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
00449                 do_fio(&c__1, (char *)&iseed[1], (ftnlen)sizeof(integer));
00450                 e_wsfe();
00451             }
00452             *info = abs(iinfo);
00453             return 0;
00454         }
00455         if (isort == 0) {
00456             ccopy_(n, &w[1], &c__1, &wtmp[1], &c__1);
00457         }
00458 
00459 /*        Do Test (1) or Test (7) */
00460 
00461         result[rsub + 1] = 0.f;
00462         i__1 = *n - 1;
00463         for (j = 1; j <= i__1; ++j) {
00464             i__2 = *n;
00465             for (i__ = j + 1; i__ <= i__2; ++i__) {
00466                 i__3 = i__ + j * h_dim1;
00467                 if (h__[i__3].r != 0.f || h__[i__3].i != 0.f) {
00468                     result[rsub + 1] = ulpinv;
00469                 }
00470 /* L20: */
00471             }
00472 /* L30: */
00473         }
00474 
00475 /*        Test (2) or (8): Compute norm(A - Q*H*Q') / (norm(A) * N * ULP) */
00476 
00477 /*        Copy A to VS1, used as workspace */
00478 
00479         clacpy_(" ", n, n, &a[a_offset], lda, &vs1[vs1_offset], ldvs);
00480 
00481 /*        Compute Q*H and store in HT. */
00482 
00483         cgemm_("No transpose", "No transpose", n, n, n, &c_b2, &vs[vs_offset], 
00484                  ldvs, &h__[h_offset], lda, &c_b1, &ht[ht_offset], lda);
00485 
00486 /*        Compute A - Q*H*Q' */
00487 
00488         q__1.r = -1.f, q__1.i = -0.f;
00489         cgemm_("No transpose", "Conjugate transpose", n, n, n, &q__1, &ht[
00490                 ht_offset], lda, &vs[vs_offset], ldvs, &c_b2, &vs1[vs1_offset]
00491 , ldvs);
00492 
00493 /* Computing MAX */
00494         r__1 = clange_("1", n, n, &a[a_offset], lda, &rwork[1]);
00495         anorm = dmax(r__1,smlnum);
00496         wnorm = clange_("1", n, n, &vs1[vs1_offset], ldvs, &rwork[1]);
00497 
00498         if (anorm > wnorm) {
00499             result[rsub + 2] = wnorm / anorm / (*n * ulp);
00500         } else {
00501             if (anorm < 1.f) {
00502 /* Computing MIN */
00503                 r__1 = wnorm, r__2 = *n * anorm;
00504                 result[rsub + 2] = dmin(r__1,r__2) / anorm / (*n * ulp);
00505             } else {
00506 /* Computing MIN */
00507                 r__1 = wnorm / anorm, r__2 = (real) (*n);
00508                 result[rsub + 2] = dmin(r__1,r__2) / (*n * ulp);
00509             }
00510         }
00511 
00512 /*        Test (3) or (9):  Compute norm( I - Q'*Q ) / ( N * ULP ) */
00513 
00514         cunt01_("Columns", n, n, &vs[vs_offset], ldvs, &work[1], lwork, &
00515                 rwork[1], &result[rsub + 3]);
00516 
00517 /*        Do Test (4) or Test (10) */
00518 
00519         result[rsub + 4] = 0.f;
00520         i__1 = *n;
00521         for (i__ = 1; i__ <= i__1; ++i__) {
00522             i__2 = i__ + i__ * h_dim1;
00523             i__3 = i__;
00524             if (h__[i__2].r != w[i__3].r || h__[i__2].i != w[i__3].i) {
00525                 result[rsub + 4] = ulpinv;
00526             }
00527 /* L40: */
00528         }
00529 
00530 /*        Do Test (5) or Test (11) */
00531 
00532         clacpy_("F", n, n, &a[a_offset], lda, &ht[ht_offset], lda);
00533         cgeesx_("N", sort, (L_fp)cslect_, "N", n, &ht[ht_offset], lda, &sdim, 
00534                 &wt[1], &vs[vs_offset], ldvs, &rconde, &rcondv, &work[1], 
00535                 lwork, &rwork[1], &bwork[1], &iinfo);
00536         if (iinfo != 0) {
00537             result[rsub + 5] = ulpinv;
00538             if (*jtype != 22) {
00539                 io___17.ciunit = *nounit;
00540                 s_wsfe(&io___17);
00541                 do_fio(&c__1, "CGEESX2", (ftnlen)7);
00542                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00543                 do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
00544                 do_fio(&c__1, (char *)&(*jtype), (ftnlen)sizeof(integer));
00545                 do_fio(&c__4, (char *)&iseed[1], (ftnlen)sizeof(integer));
00546                 e_wsfe();
00547             } else {
00548                 io___18.ciunit = *nounit;
00549                 s_wsfe(&io___18);
00550                 do_fio(&c__1, "CGEESX2", (ftnlen)7);
00551                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00552                 do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
00553                 do_fio(&c__1, (char *)&iseed[1], (ftnlen)sizeof(integer));
00554                 e_wsfe();
00555             }
00556             *info = abs(iinfo);
00557             goto L220;
00558         }
00559 
00560         result[rsub + 5] = 0.f;
00561         i__1 = *n;
00562         for (j = 1; j <= i__1; ++j) {
00563             i__2 = *n;
00564             for (i__ = 1; i__ <= i__2; ++i__) {
00565                 i__3 = i__ + j * h_dim1;
00566                 i__4 = i__ + j * ht_dim1;
00567                 if (h__[i__3].r != ht[i__4].r || h__[i__3].i != ht[i__4].i) {
00568                     result[rsub + 5] = ulpinv;
00569                 }
00570 /* L50: */
00571             }
00572 /* L60: */
00573         }
00574 
00575 /*        Do Test (6) or Test (12) */
00576 
00577         result[rsub + 6] = 0.f;
00578         i__1 = *n;
00579         for (i__ = 1; i__ <= i__1; ++i__) {
00580             i__2 = i__;
00581             i__3 = i__;
00582             if (w[i__2].r != wt[i__3].r || w[i__2].i != wt[i__3].i) {
00583                 result[rsub + 6] = ulpinv;
00584             }
00585 /* L70: */
00586         }
00587 
00588 /*        Do Test (13) */
00589 
00590         if (isort == 1) {
00591             result[13] = 0.f;
00592             knteig = 0;
00593             i__1 = *n;
00594             for (i__ = 1; i__ <= i__1; ++i__) {
00595                 if (cslect_(&w[i__])) {
00596                     ++knteig;
00597                 }
00598                 if (i__ < *n) {
00599                     if (cslect_(&w[i__ + 1]) && ! cslect_(&w[i__])) {
00600                         result[13] = ulpinv;
00601                     }
00602                 }
00603 /* L80: */
00604             }
00605             if (sdim != knteig) {
00606                 result[13] = ulpinv;
00607             }
00608         }
00609 
00610 /* L90: */
00611     }
00612 
00613 /*     If there is enough workspace, perform tests (14) and (15) */
00614 /*     as well as (10) through (13) */
00615 
00616     if (*lwork >= *n * (*n + 1) / 2) {
00617 
00618 /*        Compute both RCONDE and RCONDV with VS */
00619 
00620         *(unsigned char *)sort = 'S';
00621         result[14] = 0.f;
00622         result[15] = 0.f;
00623         clacpy_("F", n, n, &a[a_offset], lda, &ht[ht_offset], lda);
00624         cgeesx_("V", sort, (L_fp)cslect_, "B", n, &ht[ht_offset], lda, &sdim1, 
00625                  &wt[1], &vs1[vs1_offset], ldvs, &rconde, &rcondv, &work[1], 
00626                 lwork, &rwork[1], &bwork[1], &iinfo);
00627         if (iinfo != 0) {
00628             result[14] = ulpinv;
00629             result[15] = ulpinv;
00630             if (*jtype != 22) {
00631                 io___21.ciunit = *nounit;
00632                 s_wsfe(&io___21);
00633                 do_fio(&c__1, "CGEESX3", (ftnlen)7);
00634                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00635                 do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
00636                 do_fio(&c__1, (char *)&(*jtype), (ftnlen)sizeof(integer));
00637                 do_fio(&c__4, (char *)&iseed[1], (ftnlen)sizeof(integer));
00638                 e_wsfe();
00639             } else {
00640                 io___22.ciunit = *nounit;
00641                 s_wsfe(&io___22);
00642                 do_fio(&c__1, "CGEESX3", (ftnlen)7);
00643                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00644                 do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
00645                 do_fio(&c__1, (char *)&iseed[1], (ftnlen)sizeof(integer));
00646                 e_wsfe();
00647             }
00648             *info = abs(iinfo);
00649             goto L220;
00650         }
00651 
00652 /*        Perform tests (10), (11), (12), and (13) */
00653 
00654         i__1 = *n;
00655         for (i__ = 1; i__ <= i__1; ++i__) {
00656             i__2 = i__;
00657             i__3 = i__;
00658             if (w[i__2].r != wt[i__3].r || w[i__2].i != wt[i__3].i) {
00659                 result[10] = ulpinv;
00660             }
00661             i__2 = *n;
00662             for (j = 1; j <= i__2; ++j) {
00663                 i__3 = i__ + j * h_dim1;
00664                 i__4 = i__ + j * ht_dim1;
00665                 if (h__[i__3].r != ht[i__4].r || h__[i__3].i != ht[i__4].i) {
00666                     result[11] = ulpinv;
00667                 }
00668                 i__3 = i__ + j * vs_dim1;
00669                 i__4 = i__ + j * vs1_dim1;
00670                 if (vs[i__3].r != vs1[i__4].r || vs[i__3].i != vs1[i__4].i) {
00671                     result[12] = ulpinv;
00672                 }
00673 /* L100: */
00674             }
00675 /* L110: */
00676         }
00677         if (sdim != sdim1) {
00678             result[13] = ulpinv;
00679         }
00680 
00681 /*        Compute both RCONDE and RCONDV without VS, and compare */
00682 
00683         clacpy_("F", n, n, &a[a_offset], lda, &ht[ht_offset], lda);
00684         cgeesx_("N", sort, (L_fp)cslect_, "B", n, &ht[ht_offset], lda, &sdim1, 
00685                  &wt[1], &vs1[vs1_offset], ldvs, &rcnde1, &rcndv1, &work[1], 
00686                 lwork, &rwork[1], &bwork[1], &iinfo);
00687         if (iinfo != 0) {
00688             result[14] = ulpinv;
00689             result[15] = ulpinv;
00690             if (*jtype != 22) {
00691                 io___25.ciunit = *nounit;
00692                 s_wsfe(&io___25);
00693                 do_fio(&c__1, "CGEESX4", (ftnlen)7);
00694                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00695                 do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
00696                 do_fio(&c__1, (char *)&(*jtype), (ftnlen)sizeof(integer));
00697                 do_fio(&c__4, (char *)&iseed[1], (ftnlen)sizeof(integer));
00698                 e_wsfe();
00699             } else {
00700                 io___26.ciunit = *nounit;
00701                 s_wsfe(&io___26);
00702                 do_fio(&c__1, "CGEESX4", (ftnlen)7);
00703                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00704                 do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
00705                 do_fio(&c__1, (char *)&iseed[1], (ftnlen)sizeof(integer));
00706                 e_wsfe();
00707             }
00708             *info = abs(iinfo);
00709             goto L220;
00710         }
00711 
00712 /*        Perform tests (14) and (15) */
00713 
00714         if (rcnde1 != rconde) {
00715             result[14] = ulpinv;
00716         }
00717         if (rcndv1 != rcondv) {
00718             result[15] = ulpinv;
00719         }
00720 
00721 /*        Perform tests (10), (11), (12), and (13) */
00722 
00723         i__1 = *n;
00724         for (i__ = 1; i__ <= i__1; ++i__) {
00725             i__2 = i__;
00726             i__3 = i__;
00727             if (w[i__2].r != wt[i__3].r || w[i__2].i != wt[i__3].i) {
00728                 result[10] = ulpinv;
00729             }
00730             i__2 = *n;
00731             for (j = 1; j <= i__2; ++j) {
00732                 i__3 = i__ + j * h_dim1;
00733                 i__4 = i__ + j * ht_dim1;
00734                 if (h__[i__3].r != ht[i__4].r || h__[i__3].i != ht[i__4].i) {
00735                     result[11] = ulpinv;
00736                 }
00737                 i__3 = i__ + j * vs_dim1;
00738                 i__4 = i__ + j * vs1_dim1;
00739                 if (vs[i__3].r != vs1[i__4].r || vs[i__3].i != vs1[i__4].i) {
00740                     result[12] = ulpinv;
00741                 }
00742 /* L120: */
00743             }
00744 /* L130: */
00745         }
00746         if (sdim != sdim1) {
00747             result[13] = ulpinv;
00748         }
00749 
00750 /*        Compute RCONDE with VS, and compare */
00751 
00752         clacpy_("F", n, n, &a[a_offset], lda, &ht[ht_offset], lda);
00753         cgeesx_("V", sort, (L_fp)cslect_, "E", n, &ht[ht_offset], lda, &sdim1, 
00754                  &wt[1], &vs1[vs1_offset], ldvs, &rcnde1, &rcndv1, &work[1], 
00755                 lwork, &rwork[1], &bwork[1], &iinfo);
00756         if (iinfo != 0) {
00757             result[14] = ulpinv;
00758             if (*jtype != 22) {
00759                 io___27.ciunit = *nounit;
00760                 s_wsfe(&io___27);
00761                 do_fio(&c__1, "CGEESX5", (ftnlen)7);
00762                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00763                 do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
00764                 do_fio(&c__1, (char *)&(*jtype), (ftnlen)sizeof(integer));
00765                 do_fio(&c__4, (char *)&iseed[1], (ftnlen)sizeof(integer));
00766                 e_wsfe();
00767             } else {
00768                 io___28.ciunit = *nounit;
00769                 s_wsfe(&io___28);
00770                 do_fio(&c__1, "CGEESX5", (ftnlen)7);
00771                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00772                 do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
00773                 do_fio(&c__1, (char *)&iseed[1], (ftnlen)sizeof(integer));
00774                 e_wsfe();
00775             }
00776             *info = abs(iinfo);
00777             goto L220;
00778         }
00779 
00780 /*        Perform test (14) */
00781 
00782         if (rcnde1 != rconde) {
00783             result[14] = ulpinv;
00784         }
00785 
00786 /*        Perform tests (10), (11), (12), and (13) */
00787 
00788         i__1 = *n;
00789         for (i__ = 1; i__ <= i__1; ++i__) {
00790             i__2 = i__;
00791             i__3 = i__;
00792             if (w[i__2].r != wt[i__3].r || w[i__2].i != wt[i__3].i) {
00793                 result[10] = ulpinv;
00794             }
00795             i__2 = *n;
00796             for (j = 1; j <= i__2; ++j) {
00797                 i__3 = i__ + j * h_dim1;
00798                 i__4 = i__ + j * ht_dim1;
00799                 if (h__[i__3].r != ht[i__4].r || h__[i__3].i != ht[i__4].i) {
00800                     result[11] = ulpinv;
00801                 }
00802                 i__3 = i__ + j * vs_dim1;
00803                 i__4 = i__ + j * vs1_dim1;
00804                 if (vs[i__3].r != vs1[i__4].r || vs[i__3].i != vs1[i__4].i) {
00805                     result[12] = ulpinv;
00806                 }
00807 /* L140: */
00808             }
00809 /* L150: */
00810         }
00811         if (sdim != sdim1) {
00812             result[13] = ulpinv;
00813         }
00814 
00815 /*        Compute RCONDE without VS, and compare */
00816 
00817         clacpy_("F", n, n, &a[a_offset], lda, &ht[ht_offset], lda);
00818         cgeesx_("N", sort, (L_fp)cslect_, "E", n, &ht[ht_offset], lda, &sdim1, 
00819                  &wt[1], &vs1[vs1_offset], ldvs, &rcnde1, &rcndv1, &work[1], 
00820                 lwork, &rwork[1], &bwork[1], &iinfo);
00821         if (iinfo != 0) {
00822             result[14] = ulpinv;
00823             if (*jtype != 22) {
00824                 io___29.ciunit = *nounit;
00825                 s_wsfe(&io___29);
00826                 do_fio(&c__1, "CGEESX6", (ftnlen)7);
00827                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00828                 do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
00829                 do_fio(&c__1, (char *)&(*jtype), (ftnlen)sizeof(integer));
00830                 do_fio(&c__4, (char *)&iseed[1], (ftnlen)sizeof(integer));
00831                 e_wsfe();
00832             } else {
00833                 io___30.ciunit = *nounit;
00834                 s_wsfe(&io___30);
00835                 do_fio(&c__1, "CGEESX6", (ftnlen)7);
00836                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00837                 do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
00838                 do_fio(&c__1, (char *)&iseed[1], (ftnlen)sizeof(integer));
00839                 e_wsfe();
00840             }
00841             *info = abs(iinfo);
00842             goto L220;
00843         }
00844 
00845 /*        Perform test (14) */
00846 
00847         if (rcnde1 != rconde) {
00848             result[14] = ulpinv;
00849         }
00850 
00851 /*        Perform tests (10), (11), (12), and (13) */
00852 
00853         i__1 = *n;
00854         for (i__ = 1; i__ <= i__1; ++i__) {
00855             i__2 = i__;
00856             i__3 = i__;
00857             if (w[i__2].r != wt[i__3].r || w[i__2].i != wt[i__3].i) {
00858                 result[10] = ulpinv;
00859             }
00860             i__2 = *n;
00861             for (j = 1; j <= i__2; ++j) {
00862                 i__3 = i__ + j * h_dim1;
00863                 i__4 = i__ + j * ht_dim1;
00864                 if (h__[i__3].r != ht[i__4].r || h__[i__3].i != ht[i__4].i) {
00865                     result[11] = ulpinv;
00866                 }
00867                 i__3 = i__ + j * vs_dim1;
00868                 i__4 = i__ + j * vs1_dim1;
00869                 if (vs[i__3].r != vs1[i__4].r || vs[i__3].i != vs1[i__4].i) {
00870                     result[12] = ulpinv;
00871                 }
00872 /* L160: */
00873             }
00874 /* L170: */
00875         }
00876         if (sdim != sdim1) {
00877             result[13] = ulpinv;
00878         }
00879 
00880 /*        Compute RCONDV with VS, and compare */
00881 
00882         clacpy_("F", n, n, &a[a_offset], lda, &ht[ht_offset], lda);
00883         cgeesx_("V", sort, (L_fp)cslect_, "V", n, &ht[ht_offset], lda, &sdim1, 
00884                  &wt[1], &vs1[vs1_offset], ldvs, &rcnde1, &rcndv1, &work[1], 
00885                 lwork, &rwork[1], &bwork[1], &iinfo);
00886         if (iinfo != 0) {
00887             result[15] = ulpinv;
00888             if (*jtype != 22) {
00889                 io___31.ciunit = *nounit;
00890                 s_wsfe(&io___31);
00891                 do_fio(&c__1, "CGEESX7", (ftnlen)7);
00892                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00893                 do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
00894                 do_fio(&c__1, (char *)&(*jtype), (ftnlen)sizeof(integer));
00895                 do_fio(&c__4, (char *)&iseed[1], (ftnlen)sizeof(integer));
00896                 e_wsfe();
00897             } else {
00898                 io___32.ciunit = *nounit;
00899                 s_wsfe(&io___32);
00900                 do_fio(&c__1, "CGEESX7", (ftnlen)7);
00901                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00902                 do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
00903                 do_fio(&c__1, (char *)&iseed[1], (ftnlen)sizeof(integer));
00904                 e_wsfe();
00905             }
00906             *info = abs(iinfo);
00907             goto L220;
00908         }
00909 
00910 /*        Perform test (15) */
00911 
00912         if (rcndv1 != rcondv) {
00913             result[15] = ulpinv;
00914         }
00915 
00916 /*        Perform tests (10), (11), (12), and (13) */
00917 
00918         i__1 = *n;
00919         for (i__ = 1; i__ <= i__1; ++i__) {
00920             i__2 = i__;
00921             i__3 = i__;
00922             if (w[i__2].r != wt[i__3].r || w[i__2].i != wt[i__3].i) {
00923                 result[10] = ulpinv;
00924             }
00925             i__2 = *n;
00926             for (j = 1; j <= i__2; ++j) {
00927                 i__3 = i__ + j * h_dim1;
00928                 i__4 = i__ + j * ht_dim1;
00929                 if (h__[i__3].r != ht[i__4].r || h__[i__3].i != ht[i__4].i) {
00930                     result[11] = ulpinv;
00931                 }
00932                 i__3 = i__ + j * vs_dim1;
00933                 i__4 = i__ + j * vs1_dim1;
00934                 if (vs[i__3].r != vs1[i__4].r || vs[i__3].i != vs1[i__4].i) {
00935                     result[12] = ulpinv;
00936                 }
00937 /* L180: */
00938             }
00939 /* L190: */
00940         }
00941         if (sdim != sdim1) {
00942             result[13] = ulpinv;
00943         }
00944 
00945 /*        Compute RCONDV without VS, and compare */
00946 
00947         clacpy_("F", n, n, &a[a_offset], lda, &ht[ht_offset], lda);
00948         cgeesx_("N", sort, (L_fp)cslect_, "V", n, &ht[ht_offset], lda, &sdim1, 
00949                  &wt[1], &vs1[vs1_offset], ldvs, &rcnde1, &rcndv1, &work[1], 
00950                 lwork, &rwork[1], &bwork[1], &iinfo);
00951         if (iinfo != 0) {
00952             result[15] = ulpinv;
00953             if (*jtype != 22) {
00954                 io___33.ciunit = *nounit;
00955                 s_wsfe(&io___33);
00956                 do_fio(&c__1, "CGEESX8", (ftnlen)7);
00957                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00958                 do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
00959                 do_fio(&c__1, (char *)&(*jtype), (ftnlen)sizeof(integer));
00960                 do_fio(&c__4, (char *)&iseed[1], (ftnlen)sizeof(integer));
00961                 e_wsfe();
00962             } else {
00963                 io___34.ciunit = *nounit;
00964                 s_wsfe(&io___34);
00965                 do_fio(&c__1, "CGEESX8", (ftnlen)7);
00966                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00967                 do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
00968                 do_fio(&c__1, (char *)&iseed[1], (ftnlen)sizeof(integer));
00969                 e_wsfe();
00970             }
00971             *info = abs(iinfo);
00972             goto L220;
00973         }
00974 
00975 /*        Perform test (15) */
00976 
00977         if (rcndv1 != rcondv) {
00978             result[15] = ulpinv;
00979         }
00980 
00981 /*        Perform tests (10), (11), (12), and (13) */
00982 
00983         i__1 = *n;
00984         for (i__ = 1; i__ <= i__1; ++i__) {
00985             i__2 = i__;
00986             i__3 = i__;
00987             if (w[i__2].r != wt[i__3].r || w[i__2].i != wt[i__3].i) {
00988                 result[10] = ulpinv;
00989             }
00990             i__2 = *n;
00991             for (j = 1; j <= i__2; ++j) {
00992                 i__3 = i__ + j * h_dim1;
00993                 i__4 = i__ + j * ht_dim1;
00994                 if (h__[i__3].r != ht[i__4].r || h__[i__3].i != ht[i__4].i) {
00995                     result[11] = ulpinv;
00996                 }
00997                 i__3 = i__ + j * vs_dim1;
00998                 i__4 = i__ + j * vs1_dim1;
00999                 if (vs[i__3].r != vs1[i__4].r || vs[i__3].i != vs1[i__4].i) {
01000                     result[12] = ulpinv;
01001                 }
01002 /* L200: */
01003             }
01004 /* L210: */
01005         }
01006         if (sdim != sdim1) {
01007             result[13] = ulpinv;
01008         }
01009 
01010     }
01011 
01012 L220:
01013 
01014 /*     If there are precomputed reciprocal condition numbers, compare */
01015 /*     computed values with them. */
01016 
01017     if (*comp) {
01018 
01019 /*        First set up SELOPT, SELDIM, SELVAL, SELWR and SELWI so that */
01020 /*        the logical function CSLECT selects the eigenvalues specified */
01021 /*        by NSLCT, ISLCT and ISRT. */
01022 
01023         sslct_1.seldim = *n;
01024         sslct_1.selopt = 1;
01025         eps = dmax(ulp,5.9605e-8f);
01026         i__1 = *n;
01027         for (i__ = 1; i__ <= i__1; ++i__) {
01028             ipnt[i__ - 1] = i__;
01029             sslct_1.selval[i__ - 1] = FALSE_;
01030             i__2 = i__;
01031             sslct_1.selwr[i__ - 1] = wtmp[i__2].r;
01032             sslct_1.selwi[i__ - 1] = r_imag(&wtmp[i__]);
01033 /* L230: */
01034         }
01035         i__1 = *n - 1;
01036         for (i__ = 1; i__ <= i__1; ++i__) {
01037             kmin = i__;
01038             if (*isrt == 0) {
01039                 i__2 = i__;
01040                 vrimin = wtmp[i__2].r;
01041             } else {
01042                 vrimin = r_imag(&wtmp[i__]);
01043             }
01044             i__2 = *n;
01045             for (j = i__ + 1; j <= i__2; ++j) {
01046                 if (*isrt == 0) {
01047                     i__3 = j;
01048                     vricmp = wtmp[i__3].r;
01049                 } else {
01050                     vricmp = r_imag(&wtmp[j]);
01051                 }
01052                 if (vricmp < vrimin) {
01053                     kmin = j;
01054                     vrimin = vricmp;
01055                 }
01056 /* L240: */
01057             }
01058             i__2 = kmin;
01059             ctmp.r = wtmp[i__2].r, ctmp.i = wtmp[i__2].i;
01060             i__2 = kmin;
01061             i__3 = i__;
01062             wtmp[i__2].r = wtmp[i__3].r, wtmp[i__2].i = wtmp[i__3].i;
01063             i__2 = i__;
01064             wtmp[i__2].r = ctmp.r, wtmp[i__2].i = ctmp.i;
01065             itmp = ipnt[i__ - 1];
01066             ipnt[i__ - 1] = ipnt[kmin - 1];
01067             ipnt[kmin - 1] = itmp;
01068 /* L250: */
01069         }
01070         i__1 = *nslct;
01071         for (i__ = 1; i__ <= i__1; ++i__) {
01072             sslct_1.selval[ipnt[islct[i__] - 1] - 1] = TRUE_;
01073 /* L260: */
01074         }
01075 
01076 /*        Compute condition numbers */
01077 
01078         clacpy_("F", n, n, &a[a_offset], lda, &ht[ht_offset], lda);
01079         cgeesx_("N", "S", (L_fp)cslect_, "B", n, &ht[ht_offset], lda, &sdim1, 
01080                 &wt[1], &vs1[vs1_offset], ldvs, &rconde, &rcondv, &work[1], 
01081                 lwork, &rwork[1], &bwork[1], &iinfo);
01082         if (iinfo != 0) {
01083             result[16] = ulpinv;
01084             result[17] = ulpinv;
01085             io___42.ciunit = *nounit;
01086             s_wsfe(&io___42);
01087             do_fio(&c__1, "CGEESX9", (ftnlen)7);
01088             do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
01089             do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
01090             do_fio(&c__1, (char *)&iseed[1], (ftnlen)sizeof(integer));
01091             e_wsfe();
01092             *info = abs(iinfo);
01093             goto L270;
01094         }
01095 
01096 /*        Compare condition number for average of selected eigenvalues */
01097 /*        taking its condition number into account */
01098 
01099         anorm = clange_("1", n, n, &a[a_offset], lda, &rwork[1]);
01100 /* Computing MAX */
01101         r__1 = (real) (*n) * eps * anorm;
01102         v = dmax(r__1,smlnum);
01103         if (anorm == 0.f) {
01104             v = 1.f;
01105         }
01106         if (v > rcondv) {
01107             tol = 1.f;
01108         } else {
01109             tol = v / rcondv;
01110         }
01111         if (v > *rcdvin) {
01112             tolin = 1.f;
01113         } else {
01114             tolin = v / *rcdvin;
01115         }
01116 /* Computing MAX */
01117         r__1 = tol, r__2 = smlnum / eps;
01118         tol = dmax(r__1,r__2);
01119 /* Computing MAX */
01120         r__1 = tolin, r__2 = smlnum / eps;
01121         tolin = dmax(r__1,r__2);
01122         if (eps * (*rcdein - tolin) > rconde + tol) {
01123             result[16] = ulpinv;
01124         } else if (*rcdein - tolin > rconde + tol) {
01125             result[16] = (*rcdein - tolin) / (rconde + tol);
01126         } else if (*rcdein + tolin < eps * (rconde - tol)) {
01127             result[16] = ulpinv;
01128         } else if (*rcdein + tolin < rconde - tol) {
01129             result[16] = (rconde - tol) / (*rcdein + tolin);
01130         } else {
01131             result[16] = 1.f;
01132         }
01133 
01134 /*        Compare condition numbers for right invariant subspace */
01135 /*        taking its condition number into account */
01136 
01137         if (v > rcondv * rconde) {
01138             tol = rcondv;
01139         } else {
01140             tol = v / rconde;
01141         }
01142         if (v > *rcdvin * *rcdein) {
01143             tolin = *rcdvin;
01144         } else {
01145             tolin = v / *rcdein;
01146         }
01147 /* Computing MAX */
01148         r__1 = tol, r__2 = smlnum / eps;
01149         tol = dmax(r__1,r__2);
01150 /* Computing MAX */
01151         r__1 = tolin, r__2 = smlnum / eps;
01152         tolin = dmax(r__1,r__2);
01153         if (eps * (*rcdvin - tolin) > rcondv + tol) {
01154             result[17] = ulpinv;
01155         } else if (*rcdvin - tolin > rcondv + tol) {
01156             result[17] = (*rcdvin - tolin) / (rcondv + tol);
01157         } else if (*rcdvin + tolin < eps * (rcondv - tol)) {
01158             result[17] = ulpinv;
01159         } else if (*rcdvin + tolin < rcondv - tol) {
01160             result[17] = (rcondv - tol) / (*rcdvin + tolin);
01161         } else {
01162             result[17] = 1.f;
01163         }
01164 
01165 L270:
01166 
01167         ;
01168     }
01169 
01170 
01171     return 0;
01172 
01173 /*     End of CGET24 */
01174 
01175 } /* cget24_ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:55:27