zget37.c
Go to the documentation of this file.
00001 /* zget37.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 /* Table of constant values */
00017 
00018 static integer c__3 = 3;
00019 static integer c__1 = 1;
00020 static integer c__7 = 7;
00021 static integer c__5 = 5;
00022 static integer c__20 = 20;
00023 static integer c__1200 = 1200;
00024 static integer c__0 = 0;
00025 
00026 /* Subroutine */ int zget37_(doublereal *rmax, integer *lmax, integer *ninfo, 
00027         integer *knt, integer *nin)
00028 {
00029     /* System generated locals */
00030     integer i__1, i__2, i__3;
00031     doublereal d__1, d__2;
00032 
00033     /* Builtin functions */
00034     double sqrt(doublereal);
00035     integer s_rsle(cilist *), do_lio(integer *, integer *, char *, ftnlen), 
00036             e_rsle(void);
00037     double d_imag(doublecomplex *);
00038 
00039     /* Local variables */
00040     integer i__, j, m, n;
00041     doublereal s[20];
00042     doublecomplex t[400]        /* was [20][20] */;
00043     doublereal v;
00044     doublecomplex w[20], le[400]        /* was [20][20] */, re[400]     /* 
00045             was [20][20] */;
00046     doublereal val[3], dum[1], eps, sep[20], sin__[20], tol;
00047     doublecomplex tmp[400]      /* was [20][20] */;
00048     integer icmp;
00049     doublecomplex cdum[1];
00050     integer iscl, info, lcmp[3], kmin;
00051     doublereal wiin[20], vmin, vmax, tnrm;
00052     integer isrt;
00053     doublereal wrin[20], vmul, stmp[20];
00054     doublecomplex work[1200], wtmp[20];
00055     doublereal wsrt[20];
00056     extern /* Subroutine */ int dscal_(integer *, doublereal *, doublereal *, 
00057             integer *);
00058     doublereal vcmin, sepin[20];
00059     extern /* Subroutine */ int dcopy_(integer *, doublereal *, integer *, 
00060             doublereal *, integer *);
00061     doublereal tolin, rwork[40];
00062     extern /* Subroutine */ int zcopy_(integer *, doublecomplex *, integer *, 
00063             doublecomplex *, integer *), dlabad_(doublereal *, doublereal *);
00064     extern doublereal dlamch_(char *);
00065     logical select[20];
00066     extern doublereal zlange_(char *, integer *, integer *, doublecomplex *, 
00067             integer *, doublereal *);
00068     doublereal bignum;
00069     extern /* Subroutine */ int zdscal_(integer *, doublereal *, 
00070             doublecomplex *, integer *), zgehrd_(integer *, integer *, 
00071             integer *, doublecomplex *, integer *, doublecomplex *, 
00072             doublecomplex *, integer *, integer *), zlacpy_(char *, integer *, 
00073              integer *, doublecomplex *, integer *, doublecomplex *, integer *
00074 );
00075     doublereal septmp[20], smlnum;
00076     extern /* Subroutine */ int zhseqr_(char *, char *, integer *, integer *, 
00077             integer *, doublecomplex *, integer *, doublecomplex *, 
00078             doublecomplex *, integer *, doublecomplex *, integer *, integer *), ztrevc_(char *, char *, logical *, integer *, 
00079             doublecomplex *, integer *, doublecomplex *, integer *, 
00080             doublecomplex *, integer *, integer *, integer *, doublecomplex *, 
00081              doublereal *, integer *), ztrsna_(char *, char *, 
00082              logical *, integer *, doublecomplex *, integer *, doublecomplex *
00083 , integer *, doublecomplex *, integer *, doublereal *, doublereal 
00084             *, integer *, integer *, doublecomplex *, integer *, doublereal *, 
00085              integer *);
00086 
00087     /* Fortran I/O blocks */
00088     static cilist io___5 = { 0, 0, 0, 0, 0 };
00089     static cilist io___9 = { 0, 0, 0, 0, 0 };
00090     static cilist io___12 = { 0, 0, 0, 0, 0 };
00091 
00092 
00093 
00094 /*  -- LAPACK test routine (version 3.1) -- */
00095 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00096 /*     November 2006 */
00097 
00098 /*     .. Scalar Arguments .. */
00099 /*     .. */
00100 /*     .. Array Arguments .. */
00101 /*     .. */
00102 
00103 /*  Purpose */
00104 /*  ======= */
00105 
00106 /*  ZGET37 tests ZTRSNA, a routine for estimating condition numbers of */
00107 /*  eigenvalues and/or right eigenvectors of a matrix. */
00108 
00109 /*  The test matrices are read from a file with logical unit number NIN. */
00110 
00111 /*  Arguments */
00112 /*  ========== */
00113 
00114 /*  RMAX    (output) DOUBLE PRECISION array, dimension (3) */
00115 /*          Value of the largest test ratio. */
00116 /*          RMAX(1) = largest ratio comparing different calls to ZTRSNA */
00117 /*          RMAX(2) = largest error in reciprocal condition */
00118 /*                    numbers taking their conditioning into account */
00119 /*          RMAX(3) = largest error in reciprocal condition */
00120 /*                    numbers not taking their conditioning into */
00121 /*                    account (may be larger than RMAX(2)) */
00122 
00123 /*  LMAX    (output) INTEGER array, dimension (3) */
00124 /*          LMAX(i) is example number where largest test ratio */
00125 /*          RMAX(i) is achieved. Also: */
00126 /*          If ZGEHRD returns INFO nonzero on example i, LMAX(1)=i */
00127 /*          If ZHSEQR returns INFO nonzero on example i, LMAX(2)=i */
00128 /*          If ZTRSNA returns INFO nonzero on example i, LMAX(3)=i */
00129 
00130 /*  NINFO   (output) INTEGER array, dimension (3) */
00131 /*          NINFO(1) = No. of times ZGEHRD returned INFO nonzero */
00132 /*          NINFO(2) = No. of times ZHSEQR returned INFO nonzero */
00133 /*          NINFO(3) = No. of times ZTRSNA returned INFO nonzero */
00134 
00135 /*  KNT     (output) INTEGER */
00136 /*          Total number of examples tested. */
00137 
00138 /*  NIN     (input) INTEGER */
00139 /*          Input logical unit number */
00140 
00141 /*  ===================================================================== */
00142 
00143 /*     .. Parameters .. */
00144 /*     .. */
00145 /*     .. Local Scalars .. */
00146 /*     .. */
00147 /*     .. Local Arrays .. */
00148 /*     .. */
00149 /*     .. External Functions .. */
00150 /*     .. */
00151 /*     .. External Subroutines .. */
00152 /*     .. */
00153 /*     .. Intrinsic Functions .. */
00154 /*     .. */
00155 /*     .. Executable Statements .. */
00156 
00157     /* Parameter adjustments */
00158     --ninfo;
00159     --lmax;
00160     --rmax;
00161 
00162     /* Function Body */
00163     eps = dlamch_("P");
00164     smlnum = dlamch_("S") / eps;
00165     bignum = 1. / smlnum;
00166     dlabad_(&smlnum, &bignum);
00167 
00168 /*     EPSIN = 2**(-24) = precision to which input data computed */
00169 
00170     eps = max(eps,5.9605e-8);
00171     rmax[1] = 0.;
00172     rmax[2] = 0.;
00173     rmax[3] = 0.;
00174     lmax[1] = 0;
00175     lmax[2] = 0;
00176     lmax[3] = 0;
00177     *knt = 0;
00178     ninfo[1] = 0;
00179     ninfo[2] = 0;
00180     ninfo[3] = 0;
00181     val[0] = sqrt(smlnum);
00182     val[1] = 1.;
00183     val[2] = sqrt(bignum);
00184 
00185 /*     Read input data until N=0.  Assume input eigenvalues are sorted */
00186 /*     lexicographically (increasing by real part if ISRT = 0, */
00187 /*     increasing by imaginary part if ISRT = 1) */
00188 
00189 L10:
00190     io___5.ciunit = *nin;
00191     s_rsle(&io___5);
00192     do_lio(&c__3, &c__1, (char *)&n, (ftnlen)sizeof(integer));
00193     do_lio(&c__3, &c__1, (char *)&isrt, (ftnlen)sizeof(integer));
00194     e_rsle();
00195     if (n == 0) {
00196         return 0;
00197     }
00198     i__1 = n;
00199     for (i__ = 1; i__ <= i__1; ++i__) {
00200         io___9.ciunit = *nin;
00201         s_rsle(&io___9);
00202         i__2 = n;
00203         for (j = 1; j <= i__2; ++j) {
00204             do_lio(&c__7, &c__1, (char *)&tmp[i__ + j * 20 - 21], (ftnlen)
00205                     sizeof(doublecomplex));
00206         }
00207         e_rsle();
00208 /* L20: */
00209     }
00210     i__1 = n;
00211     for (i__ = 1; i__ <= i__1; ++i__) {
00212         io___12.ciunit = *nin;
00213         s_rsle(&io___12);
00214         do_lio(&c__5, &c__1, (char *)&wrin[i__ - 1], (ftnlen)sizeof(
00215                 doublereal));
00216         do_lio(&c__5, &c__1, (char *)&wiin[i__ - 1], (ftnlen)sizeof(
00217                 doublereal));
00218         do_lio(&c__5, &c__1, (char *)&sin__[i__ - 1], (ftnlen)sizeof(
00219                 doublereal));
00220         do_lio(&c__5, &c__1, (char *)&sepin[i__ - 1], (ftnlen)sizeof(
00221                 doublereal));
00222         e_rsle();
00223 /* L30: */
00224     }
00225     tnrm = zlange_("M", &n, &n, tmp, &c__20, rwork);
00226     for (iscl = 1; iscl <= 3; ++iscl) {
00227 
00228 /*        Scale input matrix */
00229 
00230         ++(*knt);
00231         zlacpy_("F", &n, &n, tmp, &c__20, t, &c__20);
00232         vmul = val[iscl - 1];
00233         i__1 = n;
00234         for (i__ = 1; i__ <= i__1; ++i__) {
00235             zdscal_(&n, &vmul, &t[i__ * 20 - 20], &c__1);
00236 /* L40: */
00237         }
00238         if (tnrm == 0.) {
00239             vmul = 1.;
00240         }
00241 
00242 /*        Compute eigenvalues and eigenvectors */
00243 
00244         i__1 = 1200 - n;
00245         zgehrd_(&n, &c__1, &n, t, &c__20, work, &work[n], &i__1, &info);
00246         if (info != 0) {
00247             lmax[1] = *knt;
00248             ++ninfo[1];
00249             goto L260;
00250         }
00251         i__1 = n - 2;
00252         for (j = 1; j <= i__1; ++j) {
00253             i__2 = n;
00254             for (i__ = j + 2; i__ <= i__2; ++i__) {
00255                 i__3 = i__ + j * 20 - 21;
00256                 t[i__3].r = 0., t[i__3].i = 0.;
00257 /* L50: */
00258             }
00259 /* L60: */
00260         }
00261 
00262 /*        Compute Schur form */
00263 
00264         zhseqr_("S", "N", &n, &c__1, &n, t, &c__20, w, cdum, &c__1, work, &
00265                 c__1200, &info);
00266         if (info != 0) {
00267             lmax[2] = *knt;
00268             ++ninfo[2];
00269             goto L260;
00270         }
00271 
00272 /*        Compute eigenvectors */
00273 
00274         i__1 = n;
00275         for (i__ = 1; i__ <= i__1; ++i__) {
00276             select[i__ - 1] = TRUE_;
00277 /* L70: */
00278         }
00279         ztrevc_("B", "A", select, &n, t, &c__20, le, &c__20, re, &c__20, &n, &
00280                 m, work, rwork, &info);
00281 
00282 /*        Compute condition numbers */
00283 
00284         ztrsna_("B", "A", select, &n, t, &c__20, le, &c__20, re, &c__20, s, 
00285                 sep, &n, &m, work, &n, rwork, &info);
00286         if (info != 0) {
00287             lmax[3] = *knt;
00288             ++ninfo[3];
00289             goto L260;
00290         }
00291 
00292 /*        Sort eigenvalues and condition numbers lexicographically */
00293 /*        to compare with inputs */
00294 
00295         zcopy_(&n, w, &c__1, wtmp, &c__1);
00296         if (isrt == 0) {
00297 
00298 /*           Sort by increasing real part */
00299 
00300             i__1 = n;
00301             for (i__ = 1; i__ <= i__1; ++i__) {
00302                 i__2 = i__ - 1;
00303                 wsrt[i__ - 1] = w[i__2].r;
00304 /* L80: */
00305             }
00306         } else {
00307 
00308 /*           Sort by increasing imaginary part */
00309 
00310             i__1 = n;
00311             for (i__ = 1; i__ <= i__1; ++i__) {
00312                 wsrt[i__ - 1] = d_imag(&w[i__ - 1]);
00313 /* L90: */
00314             }
00315         }
00316         dcopy_(&n, s, &c__1, stmp, &c__1);
00317         dcopy_(&n, sep, &c__1, septmp, &c__1);
00318         d__1 = 1. / vmul;
00319         dscal_(&n, &d__1, septmp, &c__1);
00320         i__1 = n - 1;
00321         for (i__ = 1; i__ <= i__1; ++i__) {
00322             kmin = i__;
00323             vmin = wsrt[i__ - 1];
00324             i__2 = n;
00325             for (j = i__ + 1; j <= i__2; ++j) {
00326                 if (wsrt[j - 1] < vmin) {
00327                     kmin = j;
00328                     vmin = wsrt[j - 1];
00329                 }
00330 /* L100: */
00331             }
00332             wsrt[kmin - 1] = wsrt[i__ - 1];
00333             wsrt[i__ - 1] = vmin;
00334             i__2 = i__ - 1;
00335             vcmin = wtmp[i__2].r;
00336             i__2 = i__ - 1;
00337             i__3 = kmin - 1;
00338             wtmp[i__2].r = w[i__3].r, wtmp[i__2].i = w[i__3].i;
00339             i__2 = kmin - 1;
00340             wtmp[i__2].r = vcmin, wtmp[i__2].i = 0.;
00341             vmin = stmp[kmin - 1];
00342             stmp[kmin - 1] = stmp[i__ - 1];
00343             stmp[i__ - 1] = vmin;
00344             vmin = septmp[kmin - 1];
00345             septmp[kmin - 1] = septmp[i__ - 1];
00346             septmp[i__ - 1] = vmin;
00347 /* L110: */
00348         }
00349 
00350 /*        Compare condition numbers for eigenvalues */
00351 /*        taking their condition numbers into account */
00352 
00353 /* Computing MAX */
00354         d__1 = (doublereal) n * 2. * eps * tnrm;
00355         v = max(d__1,smlnum);
00356         if (tnrm == 0.) {
00357             v = 1.;
00358         }
00359         i__1 = n;
00360         for (i__ = 1; i__ <= i__1; ++i__) {
00361             if (v > septmp[i__ - 1]) {
00362                 tol = 1.;
00363             } else {
00364                 tol = v / septmp[i__ - 1];
00365             }
00366             if (v > sepin[i__ - 1]) {
00367                 tolin = 1.;
00368             } else {
00369                 tolin = v / sepin[i__ - 1];
00370             }
00371 /* Computing MAX */
00372             d__1 = tol, d__2 = smlnum / eps;
00373             tol = max(d__1,d__2);
00374 /* Computing MAX */
00375             d__1 = tolin, d__2 = smlnum / eps;
00376             tolin = max(d__1,d__2);
00377             if (eps * (sin__[i__ - 1] - tolin) > stmp[i__ - 1] + tol) {
00378                 vmax = 1. / eps;
00379             } else if (sin__[i__ - 1] - tolin > stmp[i__ - 1] + tol) {
00380                 vmax = (sin__[i__ - 1] - tolin) / (stmp[i__ - 1] + tol);
00381             } else if (sin__[i__ - 1] + tolin < eps * (stmp[i__ - 1] - tol)) {
00382                 vmax = 1. / eps;
00383             } else if (sin__[i__ - 1] + tolin < stmp[i__ - 1] - tol) {
00384                 vmax = (stmp[i__ - 1] - tol) / (sin__[i__ - 1] + tolin);
00385             } else {
00386                 vmax = 1.;
00387             }
00388             if (vmax > rmax[2]) {
00389                 rmax[2] = vmax;
00390                 if (ninfo[2] == 0) {
00391                     lmax[2] = *knt;
00392                 }
00393             }
00394 /* L120: */
00395         }
00396 
00397 /*        Compare condition numbers for eigenvectors */
00398 /*        taking their condition numbers into account */
00399 
00400         i__1 = n;
00401         for (i__ = 1; i__ <= i__1; ++i__) {
00402             if (v > septmp[i__ - 1] * stmp[i__ - 1]) {
00403                 tol = septmp[i__ - 1];
00404             } else {
00405                 tol = v / stmp[i__ - 1];
00406             }
00407             if (v > sepin[i__ - 1] * sin__[i__ - 1]) {
00408                 tolin = sepin[i__ - 1];
00409             } else {
00410                 tolin = v / sin__[i__ - 1];
00411             }
00412 /* Computing MAX */
00413             d__1 = tol, d__2 = smlnum / eps;
00414             tol = max(d__1,d__2);
00415 /* Computing MAX */
00416             d__1 = tolin, d__2 = smlnum / eps;
00417             tolin = max(d__1,d__2);
00418             if (eps * (sepin[i__ - 1] - tolin) > septmp[i__ - 1] + tol) {
00419                 vmax = 1. / eps;
00420             } else if (sepin[i__ - 1] - tolin > septmp[i__ - 1] + tol) {
00421                 vmax = (sepin[i__ - 1] - tolin) / (septmp[i__ - 1] + tol);
00422             } else if (sepin[i__ - 1] + tolin < eps * (septmp[i__ - 1] - tol))
00423                      {
00424                 vmax = 1. / eps;
00425             } else if (sepin[i__ - 1] + tolin < septmp[i__ - 1] - tol) {
00426                 vmax = (septmp[i__ - 1] - tol) / (sepin[i__ - 1] + tolin);
00427             } else {
00428                 vmax = 1.;
00429             }
00430             if (vmax > rmax[2]) {
00431                 rmax[2] = vmax;
00432                 if (ninfo[2] == 0) {
00433                     lmax[2] = *knt;
00434                 }
00435             }
00436 /* L130: */
00437         }
00438 
00439 /*        Compare condition numbers for eigenvalues */
00440 /*        without taking their condition numbers into account */
00441 
00442         i__1 = n;
00443         for (i__ = 1; i__ <= i__1; ++i__) {
00444             if (sin__[i__ - 1] <= (doublereal) (n << 1) * eps && stmp[i__ - 1]
00445                      <= (doublereal) (n << 1) * eps) {
00446                 vmax = 1.;
00447             } else if (eps * sin__[i__ - 1] > stmp[i__ - 1]) {
00448                 vmax = 1. / eps;
00449             } else if (sin__[i__ - 1] > stmp[i__ - 1]) {
00450                 vmax = sin__[i__ - 1] / stmp[i__ - 1];
00451             } else if (sin__[i__ - 1] < eps * stmp[i__ - 1]) {
00452                 vmax = 1. / eps;
00453             } else if (sin__[i__ - 1] < stmp[i__ - 1]) {
00454                 vmax = stmp[i__ - 1] / sin__[i__ - 1];
00455             } else {
00456                 vmax = 1.;
00457             }
00458             if (vmax > rmax[3]) {
00459                 rmax[3] = vmax;
00460                 if (ninfo[3] == 0) {
00461                     lmax[3] = *knt;
00462                 }
00463             }
00464 /* L140: */
00465         }
00466 
00467 /*        Compare condition numbers for eigenvectors */
00468 /*        without taking their condition numbers into account */
00469 
00470         i__1 = n;
00471         for (i__ = 1; i__ <= i__1; ++i__) {
00472             if (sepin[i__ - 1] <= v && septmp[i__ - 1] <= v) {
00473                 vmax = 1.;
00474             } else if (eps * sepin[i__ - 1] > septmp[i__ - 1]) {
00475                 vmax = 1. / eps;
00476             } else if (sepin[i__ - 1] > septmp[i__ - 1]) {
00477                 vmax = sepin[i__ - 1] / septmp[i__ - 1];
00478             } else if (sepin[i__ - 1] < eps * septmp[i__ - 1]) {
00479                 vmax = 1. / eps;
00480             } else if (sepin[i__ - 1] < septmp[i__ - 1]) {
00481                 vmax = septmp[i__ - 1] / sepin[i__ - 1];
00482             } else {
00483                 vmax = 1.;
00484             }
00485             if (vmax > rmax[3]) {
00486                 rmax[3] = vmax;
00487                 if (ninfo[3] == 0) {
00488                     lmax[3] = *knt;
00489                 }
00490             }
00491 /* L150: */
00492         }
00493 
00494 /*        Compute eigenvalue condition numbers only and compare */
00495 
00496         vmax = 0.;
00497         dum[0] = -1.;
00498         dcopy_(&n, dum, &c__0, stmp, &c__1);
00499         dcopy_(&n, dum, &c__0, septmp, &c__1);
00500         ztrsna_("E", "A", select, &n, t, &c__20, le, &c__20, re, &c__20, stmp, 
00501                  septmp, &n, &m, work, &n, rwork, &info)
00502                 ;
00503         if (info != 0) {
00504             lmax[3] = *knt;
00505             ++ninfo[3];
00506             goto L260;
00507         }
00508         i__1 = n;
00509         for (i__ = 1; i__ <= i__1; ++i__) {
00510             if (stmp[i__ - 1] != s[i__ - 1]) {
00511                 vmax = 1. / eps;
00512             }
00513             if (septmp[i__ - 1] != dum[0]) {
00514                 vmax = 1. / eps;
00515             }
00516 /* L160: */
00517         }
00518 
00519 /*        Compute eigenvector condition numbers only and compare */
00520 
00521         dcopy_(&n, dum, &c__0, stmp, &c__1);
00522         dcopy_(&n, dum, &c__0, septmp, &c__1);
00523         ztrsna_("V", "A", select, &n, t, &c__20, le, &c__20, re, &c__20, stmp, 
00524                  septmp, &n, &m, work, &n, rwork, &info)
00525                 ;
00526         if (info != 0) {
00527             lmax[3] = *knt;
00528             ++ninfo[3];
00529             goto L260;
00530         }
00531         i__1 = n;
00532         for (i__ = 1; i__ <= i__1; ++i__) {
00533             if (stmp[i__ - 1] != dum[0]) {
00534                 vmax = 1. / eps;
00535             }
00536             if (septmp[i__ - 1] != sep[i__ - 1]) {
00537                 vmax = 1. / eps;
00538             }
00539 /* L170: */
00540         }
00541 
00542 /*        Compute all condition numbers using SELECT and compare */
00543 
00544         i__1 = n;
00545         for (i__ = 1; i__ <= i__1; ++i__) {
00546             select[i__ - 1] = TRUE_;
00547 /* L180: */
00548         }
00549         dcopy_(&n, dum, &c__0, stmp, &c__1);
00550         dcopy_(&n, dum, &c__0, septmp, &c__1);
00551         ztrsna_("B", "S", select, &n, t, &c__20, le, &c__20, re, &c__20, stmp, 
00552                  septmp, &n, &m, work, &n, rwork, &info)
00553                 ;
00554         if (info != 0) {
00555             lmax[3] = *knt;
00556             ++ninfo[3];
00557             goto L260;
00558         }
00559         i__1 = n;
00560         for (i__ = 1; i__ <= i__1; ++i__) {
00561             if (septmp[i__ - 1] != sep[i__ - 1]) {
00562                 vmax = 1. / eps;
00563             }
00564             if (stmp[i__ - 1] != s[i__ - 1]) {
00565                 vmax = 1. / eps;
00566             }
00567 /* L190: */
00568         }
00569 
00570 /*        Compute eigenvalue condition numbers using SELECT and compare */
00571 
00572         dcopy_(&n, dum, &c__0, stmp, &c__1);
00573         dcopy_(&n, dum, &c__0, septmp, &c__1);
00574         ztrsna_("E", "S", select, &n, t, &c__20, le, &c__20, re, &c__20, stmp, 
00575                  septmp, &n, &m, work, &n, rwork, &info)
00576                 ;
00577         if (info != 0) {
00578             lmax[3] = *knt;
00579             ++ninfo[3];
00580             goto L260;
00581         }
00582         i__1 = n;
00583         for (i__ = 1; i__ <= i__1; ++i__) {
00584             if (stmp[i__ - 1] != s[i__ - 1]) {
00585                 vmax = 1. / eps;
00586             }
00587             if (septmp[i__ - 1] != dum[0]) {
00588                 vmax = 1. / eps;
00589             }
00590 /* L200: */
00591         }
00592 
00593 /*        Compute eigenvector condition numbers using SELECT and compare */
00594 
00595         dcopy_(&n, dum, &c__0, stmp, &c__1);
00596         dcopy_(&n, dum, &c__0, septmp, &c__1);
00597         ztrsna_("V", "S", select, &n, t, &c__20, le, &c__20, re, &c__20, stmp, 
00598                  septmp, &n, &m, work, &n, rwork, &info)
00599                 ;
00600         if (info != 0) {
00601             lmax[3] = *knt;
00602             ++ninfo[3];
00603             goto L260;
00604         }
00605         i__1 = n;
00606         for (i__ = 1; i__ <= i__1; ++i__) {
00607             if (stmp[i__ - 1] != dum[0]) {
00608                 vmax = 1. / eps;
00609             }
00610             if (septmp[i__ - 1] != sep[i__ - 1]) {
00611                 vmax = 1. / eps;
00612             }
00613 /* L210: */
00614         }
00615         if (vmax > rmax[1]) {
00616             rmax[1] = vmax;
00617             if (ninfo[1] == 0) {
00618                 lmax[1] = *knt;
00619             }
00620         }
00621 
00622 /*        Select second and next to last eigenvalues */
00623 
00624         i__1 = n;
00625         for (i__ = 1; i__ <= i__1; ++i__) {
00626             select[i__ - 1] = FALSE_;
00627 /* L220: */
00628         }
00629         icmp = 0;
00630         if (n > 1) {
00631             icmp = 1;
00632             lcmp[0] = 2;
00633             select[1] = TRUE_;
00634             zcopy_(&n, &re[20], &c__1, re, &c__1);
00635             zcopy_(&n, &le[20], &c__1, le, &c__1);
00636         }
00637         if (n > 3) {
00638             icmp = 2;
00639             lcmp[1] = n - 1;
00640             select[n - 2] = TRUE_;
00641             zcopy_(&n, &re[(n - 1) * 20 - 20], &c__1, &re[20], &c__1);
00642             zcopy_(&n, &le[(n - 1) * 20 - 20], &c__1, &le[20], &c__1);
00643         }
00644 
00645 /*        Compute all selected condition numbers */
00646 
00647         dcopy_(&icmp, dum, &c__0, stmp, &c__1);
00648         dcopy_(&icmp, dum, &c__0, septmp, &c__1);
00649         ztrsna_("B", "S", select, &n, t, &c__20, le, &c__20, re, &c__20, stmp, 
00650                  septmp, &n, &m, work, &n, rwork, &info)
00651                 ;
00652         if (info != 0) {
00653             lmax[3] = *knt;
00654             ++ninfo[3];
00655             goto L260;
00656         }
00657         i__1 = icmp;
00658         for (i__ = 1; i__ <= i__1; ++i__) {
00659             j = lcmp[i__ - 1];
00660             if (septmp[i__ - 1] != sep[j - 1]) {
00661                 vmax = 1. / eps;
00662             }
00663             if (stmp[i__ - 1] != s[j - 1]) {
00664                 vmax = 1. / eps;
00665             }
00666 /* L230: */
00667         }
00668 
00669 /*        Compute selected eigenvalue condition numbers */
00670 
00671         dcopy_(&icmp, dum, &c__0, stmp, &c__1);
00672         dcopy_(&icmp, dum, &c__0, septmp, &c__1);
00673         ztrsna_("E", "S", select, &n, t, &c__20, le, &c__20, re, &c__20, stmp, 
00674                  septmp, &n, &m, work, &n, rwork, &info)
00675                 ;
00676         if (info != 0) {
00677             lmax[3] = *knt;
00678             ++ninfo[3];
00679             goto L260;
00680         }
00681         i__1 = icmp;
00682         for (i__ = 1; i__ <= i__1; ++i__) {
00683             j = lcmp[i__ - 1];
00684             if (stmp[i__ - 1] != s[j - 1]) {
00685                 vmax = 1. / eps;
00686             }
00687             if (septmp[i__ - 1] != dum[0]) {
00688                 vmax = 1. / eps;
00689             }
00690 /* L240: */
00691         }
00692 
00693 /*        Compute selected eigenvector condition numbers */
00694 
00695         dcopy_(&icmp, dum, &c__0, stmp, &c__1);
00696         dcopy_(&icmp, dum, &c__0, septmp, &c__1);
00697         ztrsna_("V", "S", select, &n, t, &c__20, le, &c__20, re, &c__20, stmp, 
00698                  septmp, &n, &m, work, &n, rwork, &info)
00699                 ;
00700         if (info != 0) {
00701             lmax[3] = *knt;
00702             ++ninfo[3];
00703             goto L260;
00704         }
00705         i__1 = icmp;
00706         for (i__ = 1; i__ <= i__1; ++i__) {
00707             j = lcmp[i__ - 1];
00708             if (stmp[i__ - 1] != dum[0]) {
00709                 vmax = 1. / eps;
00710             }
00711             if (septmp[i__ - 1] != sep[j - 1]) {
00712                 vmax = 1. / eps;
00713             }
00714 /* L250: */
00715         }
00716         if (vmax > rmax[1]) {
00717             rmax[1] = vmax;
00718             if (ninfo[1] == 0) {
00719                 lmax[1] = *knt;
00720             }
00721         }
00722 L260:
00723         ;
00724     }
00725     goto L10;
00726 
00727 /*     End of ZGET37 */
00728 
00729 } /* zget37_ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:56:35