dchkeq.c
Go to the documentation of this file.
00001 /* dchkeq.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 doublereal c_b7 = 10.;
00019 static integer c_n1 = -1;
00020 static integer c__5 = 5;
00021 static integer c__13 = 13;
00022 static integer c__1 = 1;
00023 
00024 /* Subroutine */ int dchkeq_(doublereal *thresh, integer *nout)
00025 {
00026     /* Format strings */
00027     static char fmt_9999[] = "(1x,\002All tests for \002,a3,\002 routines pa"
00028             "ssed the threshold\002)";
00029     static char fmt_9998[] = "(\002 DGEEQU failed test with value \002,d10"
00030             ".3,\002 exceeding\002,\002 threshold \002,d10.3)";
00031     static char fmt_9997[] = "(\002 DGBEQU failed test with value \002,d10"
00032             ".3,\002 exceeding\002,\002 threshold \002,d10.3)";
00033     static char fmt_9996[] = "(\002 DPOEQU failed test with value \002,d10"
00034             ".3,\002 exceeding\002,\002 threshold \002,d10.3)";
00035     static char fmt_9995[] = "(\002 DPPEQU failed test with value \002,d10"
00036             ".3,\002 exceeding\002,\002 threshold \002,d10.3)";
00037     static char fmt_9994[] = "(\002 DPBEQU failed test with value \002,d10"
00038             ".3,\002 exceeding\002,\002 threshold \002,d10.3)";
00039 
00040     /* System generated locals */
00041     integer i__1, i__2, i__3, i__4, i__5, i__6, i__7, i__8;
00042     doublereal d__1, d__2, d__3;
00043 
00044     /* Builtin functions */
00045     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00046     double pow_di(doublereal *, integer *);
00047     integer pow_ii(integer *, integer *), s_wsle(cilist *), e_wsle(void), 
00048             s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00049 
00050     /* Local variables */
00051     doublereal a[25]    /* was [5][5] */, c__[5];
00052     integer i__, j, m, n;
00053     doublereal r__[5], ab[65]   /* was [13][5] */, ap[15];
00054     integer kl;
00055     logical ok;
00056     integer ku;
00057     doublereal eps, pow[11];
00058     integer info;
00059     char path[3];
00060     doublereal norm, rpow[11], ccond, rcond, rcmin, rcmax, ratio;
00061     extern doublereal dlamch_(char *);
00062     extern /* Subroutine */ int dgbequ_(integer *, integer *, integer *, 
00063             integer *, doublereal *, integer *, doublereal *, doublereal *, 
00064             doublereal *, doublereal *, doublereal *, integer *), dgeequ_(
00065             integer *, integer *, doublereal *, integer *, doublereal *, 
00066             doublereal *, doublereal *, doublereal *, doublereal *, integer *)
00067             , dpbequ_(char *, integer *, integer *, doublereal *, integer *, 
00068             doublereal *, doublereal *, doublereal *, integer *), 
00069             dpoequ_(integer *, doublereal *, integer *, doublereal *, 
00070             doublereal *, doublereal *, integer *), dppequ_(char *, integer *, 
00071              doublereal *, doublereal *, doublereal *, doublereal *, integer *
00072 );
00073     doublereal reslts[5];
00074 
00075     /* Fortran I/O blocks */
00076     static cilist io___25 = { 0, 0, 0, 0, 0 };
00077     static cilist io___26 = { 0, 0, 0, fmt_9999, 0 };
00078     static cilist io___27 = { 0, 0, 0, fmt_9998, 0 };
00079     static cilist io___28 = { 0, 0, 0, fmt_9997, 0 };
00080     static cilist io___29 = { 0, 0, 0, fmt_9996, 0 };
00081     static cilist io___30 = { 0, 0, 0, fmt_9995, 0 };
00082     static cilist io___31 = { 0, 0, 0, fmt_9994, 0 };
00083 
00084 
00085 
00086 /*  -- LAPACK test routine (version 3.1) -- */
00087 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00088 /*     November 2006 */
00089 
00090 /*     .. Scalar Arguments .. */
00091 /*     .. */
00092 
00093 /*  Purpose */
00094 /*  ======= */
00095 
00096 /*  DCHKEQ tests DGEEQU, DGBEQU, DPOEQU, DPPEQU and DPBEQU */
00097 
00098 /*  Arguments */
00099 /*  ========= */
00100 
00101 /*  THRESH  (input) DOUBLE PRECISION */
00102 /*          Threshold for testing routines. Should be between 2 and 10. */
00103 
00104 /*  NOUT    (input) INTEGER */
00105 /*          The unit number for output. */
00106 
00107 /*  ===================================================================== */
00108 
00109 /*     .. Parameters .. */
00110 /*     .. */
00111 /*     .. Local Scalars .. */
00112 /*     .. */
00113 /*     .. Local Arrays .. */
00114 /*     .. */
00115 /*     .. External Functions .. */
00116 /*     .. */
00117 /*     .. External Subroutines .. */
00118 /*     .. */
00119 /*     .. Intrinsic Functions .. */
00120 /*     .. */
00121 /*     .. Executable Statements .. */
00122 
00123     s_copy(path, "Double precision", (ftnlen)1, (ftnlen)16);
00124     s_copy(path + 1, "EQ", (ftnlen)2, (ftnlen)2);
00125 
00126     eps = dlamch_("P");
00127     for (i__ = 1; i__ <= 5; ++i__) {
00128         reslts[i__ - 1] = 0.;
00129 /* L10: */
00130     }
00131     for (i__ = 1; i__ <= 11; ++i__) {
00132         i__1 = i__ - 1;
00133         pow[i__ - 1] = pow_di(&c_b7, &i__1);
00134         rpow[i__ - 1] = 1. / pow[i__ - 1];
00135 /* L20: */
00136     }
00137 
00138 /*     Test DGEEQU */
00139 
00140     for (n = 0; n <= 5; ++n) {
00141         for (m = 0; m <= 5; ++m) {
00142 
00143             for (j = 1; j <= 5; ++j) {
00144                 for (i__ = 1; i__ <= 5; ++i__) {
00145                     if (i__ <= m && j <= n) {
00146                         i__1 = i__ + j;
00147                         a[i__ + j * 5 - 6] = pow[i__ + j] * pow_ii(&c_n1, &
00148                                 i__1);
00149                     } else {
00150                         a[i__ + j * 5 - 6] = 0.;
00151                     }
00152 /* L30: */
00153                 }
00154 /* L40: */
00155             }
00156 
00157             dgeequ_(&m, &n, a, &c__5, r__, c__, &rcond, &ccond, &norm, &info);
00158 
00159             if (info != 0) {
00160                 reslts[0] = 1.;
00161             } else {
00162                 if (n != 0 && m != 0) {
00163 /* Computing MAX */
00164                     d__2 = reslts[0], d__3 = (d__1 = (rcond - rpow[m - 1]) / 
00165                             rpow[m - 1], abs(d__1));
00166                     reslts[0] = max(d__2,d__3);
00167 /* Computing MAX */
00168                     d__2 = reslts[0], d__3 = (d__1 = (ccond - rpow[n - 1]) / 
00169                             rpow[n - 1], abs(d__1));
00170                     reslts[0] = max(d__2,d__3);
00171 /* Computing MAX */
00172                     d__2 = reslts[0], d__3 = (d__1 = (norm - pow[n + m]) / 
00173                             pow[n + m], abs(d__1));
00174                     reslts[0] = max(d__2,d__3);
00175                     i__1 = m;
00176                     for (i__ = 1; i__ <= i__1; ++i__) {
00177 /* Computing MAX */
00178                         d__2 = reslts[0], d__3 = (d__1 = (r__[i__ - 1] - rpow[
00179                                 i__ + n]) / rpow[i__ + n], abs(d__1));
00180                         reslts[0] = max(d__2,d__3);
00181 /* L50: */
00182                     }
00183                     i__1 = n;
00184                     for (j = 1; j <= i__1; ++j) {
00185 /* Computing MAX */
00186                         d__2 = reslts[0], d__3 = (d__1 = (c__[j - 1] - pow[n 
00187                                 - j]) / pow[n - j], abs(d__1));
00188                         reslts[0] = max(d__2,d__3);
00189 /* L60: */
00190                     }
00191                 }
00192             }
00193 
00194 /* L70: */
00195         }
00196 /* L80: */
00197     }
00198 
00199 /*     Test with zero rows and columns */
00200 
00201     for (j = 1; j <= 5; ++j) {
00202         a[j * 5 - 2] = 0.;
00203 /* L90: */
00204     }
00205     dgeequ_(&c__5, &c__5, a, &c__5, r__, c__, &rcond, &ccond, &norm, &info);
00206     if (info != 4) {
00207         reslts[0] = 1.;
00208     }
00209 
00210     for (j = 1; j <= 5; ++j) {
00211         a[j * 5 - 2] = 1.;
00212 /* L100: */
00213     }
00214     for (i__ = 1; i__ <= 5; ++i__) {
00215         a[i__ + 14] = 0.;
00216 /* L110: */
00217     }
00218     dgeequ_(&c__5, &c__5, a, &c__5, r__, c__, &rcond, &ccond, &norm, &info);
00219     if (info != 9) {
00220         reslts[0] = 1.;
00221     }
00222     reslts[0] /= eps;
00223 
00224 /*     Test DGBEQU */
00225 
00226     for (n = 0; n <= 5; ++n) {
00227         for (m = 0; m <= 5; ++m) {
00228 /* Computing MAX */
00229             i__2 = m - 1;
00230             i__1 = max(i__2,0);
00231             for (kl = 0; kl <= i__1; ++kl) {
00232 /* Computing MAX */
00233                 i__3 = n - 1;
00234                 i__2 = max(i__3,0);
00235                 for (ku = 0; ku <= i__2; ++ku) {
00236 
00237                     for (j = 1; j <= 5; ++j) {
00238                         for (i__ = 1; i__ <= 13; ++i__) {
00239                             ab[i__ + j * 13 - 14] = 0.;
00240 /* L120: */
00241                         }
00242 /* L130: */
00243                     }
00244                     i__3 = n;
00245                     for (j = 1; j <= i__3; ++j) {
00246                         i__4 = m;
00247                         for (i__ = 1; i__ <= i__4; ++i__) {
00248 /* Computing MIN */
00249                             i__5 = m, i__6 = j + kl;
00250 /* Computing MAX */
00251                             i__7 = 1, i__8 = j - ku;
00252                             if (i__ <= min(i__5,i__6) && i__ >= max(i__7,i__8)
00253                                      && j <= n) {
00254                                 i__5 = i__ + j;
00255                                 ab[ku + 1 + i__ - j + j * 13 - 14] = pow[i__ 
00256                                         + j] * pow_ii(&c_n1, &i__5);
00257                             }
00258 /* L140: */
00259                         }
00260 /* L150: */
00261                     }
00262 
00263                     dgbequ_(&m, &n, &kl, &ku, ab, &c__13, r__, c__, &rcond, &
00264                             ccond, &norm, &info);
00265 
00266                     if (info != 0) {
00267                         if (! (n + kl < m && info == n + kl + 1 || m + ku < n 
00268                                 && info == (m << 1) + ku + 1)) {
00269                             reslts[1] = 1.;
00270                         }
00271                     } else {
00272                         if (n != 0 && m != 0) {
00273 
00274                             rcmin = r__[0];
00275                             rcmax = r__[0];
00276                             i__3 = m;
00277                             for (i__ = 1; i__ <= i__3; ++i__) {
00278 /* Computing MIN */
00279                                 d__1 = rcmin, d__2 = r__[i__ - 1];
00280                                 rcmin = min(d__1,d__2);
00281 /* Computing MAX */
00282                                 d__1 = rcmax, d__2 = r__[i__ - 1];
00283                                 rcmax = max(d__1,d__2);
00284 /* L160: */
00285                             }
00286                             ratio = rcmin / rcmax;
00287 /* Computing MAX */
00288                             d__2 = reslts[1], d__3 = (d__1 = (rcond - ratio) /
00289                                      ratio, abs(d__1));
00290                             reslts[1] = max(d__2,d__3);
00291 
00292                             rcmin = c__[0];
00293                             rcmax = c__[0];
00294                             i__3 = n;
00295                             for (j = 1; j <= i__3; ++j) {
00296 /* Computing MIN */
00297                                 d__1 = rcmin, d__2 = c__[j - 1];
00298                                 rcmin = min(d__1,d__2);
00299 /* Computing MAX */
00300                                 d__1 = rcmax, d__2 = c__[j - 1];
00301                                 rcmax = max(d__1,d__2);
00302 /* L170: */
00303                             }
00304                             ratio = rcmin / rcmax;
00305 /* Computing MAX */
00306                             d__2 = reslts[1], d__3 = (d__1 = (ccond - ratio) /
00307                                      ratio, abs(d__1));
00308                             reslts[1] = max(d__2,d__3);
00309 
00310 /* Computing MAX */
00311                             d__2 = reslts[1], d__3 = (d__1 = (norm - pow[n + 
00312                                     m]) / pow[n + m], abs(d__1));
00313                             reslts[1] = max(d__2,d__3);
00314                             i__3 = m;
00315                             for (i__ = 1; i__ <= i__3; ++i__) {
00316                                 rcmax = 0.;
00317                                 i__4 = n;
00318                                 for (j = 1; j <= i__4; ++j) {
00319                                     if (i__ <= j + kl && i__ >= j - ku) {
00320                                         ratio = (d__1 = r__[i__ - 1] * pow[
00321                                                 i__ + j] * c__[j - 1], abs(
00322                                                 d__1));
00323                                         rcmax = max(rcmax,ratio);
00324                                     }
00325 /* L180: */
00326                                 }
00327 /* Computing MAX */
00328                                 d__2 = reslts[1], d__3 = (d__1 = 1. - rcmax, 
00329                                         abs(d__1));
00330                                 reslts[1] = max(d__2,d__3);
00331 /* L190: */
00332                             }
00333 
00334                             i__3 = n;
00335                             for (j = 1; j <= i__3; ++j) {
00336                                 rcmax = 0.;
00337                                 i__4 = m;
00338                                 for (i__ = 1; i__ <= i__4; ++i__) {
00339                                     if (i__ <= j + kl && i__ >= j - ku) {
00340                                         ratio = (d__1 = r__[i__ - 1] * pow[
00341                                                 i__ + j] * c__[j - 1], abs(
00342                                                 d__1));
00343                                         rcmax = max(rcmax,ratio);
00344                                     }
00345 /* L200: */
00346                                 }
00347 /* Computing MAX */
00348                                 d__2 = reslts[1], d__3 = (d__1 = 1. - rcmax, 
00349                                         abs(d__1));
00350                                 reslts[1] = max(d__2,d__3);
00351 /* L210: */
00352                             }
00353                         }
00354                     }
00355 
00356 /* L220: */
00357                 }
00358 /* L230: */
00359             }
00360 /* L240: */
00361         }
00362 /* L250: */
00363     }
00364     reslts[1] /= eps;
00365 
00366 /*     Test DPOEQU */
00367 
00368     for (n = 0; n <= 5; ++n) {
00369 
00370         for (i__ = 1; i__ <= 5; ++i__) {
00371             for (j = 1; j <= 5; ++j) {
00372                 if (i__ <= n && j == i__) {
00373                     i__1 = i__ + j;
00374                     a[i__ + j * 5 - 6] = pow[i__ + j] * pow_ii(&c_n1, &i__1);
00375                 } else {
00376                     a[i__ + j * 5 - 6] = 0.;
00377                 }
00378 /* L260: */
00379             }
00380 /* L270: */
00381         }
00382 
00383         dpoequ_(&n, a, &c__5, r__, &rcond, &norm, &info);
00384 
00385         if (info != 0) {
00386             reslts[2] = 1.;
00387         } else {
00388             if (n != 0) {
00389 /* Computing MAX */
00390                 d__2 = reslts[2], d__3 = (d__1 = (rcond - rpow[n - 1]) / rpow[
00391                         n - 1], abs(d__1));
00392                 reslts[2] = max(d__2,d__3);
00393 /* Computing MAX */
00394                 d__2 = reslts[2], d__3 = (d__1 = (norm - pow[n * 2]) / pow[n *
00395                          2], abs(d__1));
00396                 reslts[2] = max(d__2,d__3);
00397                 i__1 = n;
00398                 for (i__ = 1; i__ <= i__1; ++i__) {
00399 /* Computing MAX */
00400                     d__2 = reslts[2], d__3 = (d__1 = (r__[i__ - 1] - rpow[i__]
00401                             ) / rpow[i__], abs(d__1));
00402                     reslts[2] = max(d__2,d__3);
00403 /* L280: */
00404                 }
00405             }
00406         }
00407 /* L290: */
00408     }
00409     a[18] = -1.;
00410     dpoequ_(&c__5, a, &c__5, r__, &rcond, &norm, &info);
00411     if (info != 4) {
00412         reslts[2] = 1.;
00413     }
00414     reslts[2] /= eps;
00415 
00416 /*     Test DPPEQU */
00417 
00418     for (n = 0; n <= 5; ++n) {
00419 
00420 /*        Upper triangular packed storage */
00421 
00422         i__1 = n * (n + 1) / 2;
00423         for (i__ = 1; i__ <= i__1; ++i__) {
00424             ap[i__ - 1] = 0.;
00425 /* L300: */
00426         }
00427         i__1 = n;
00428         for (i__ = 1; i__ <= i__1; ++i__) {
00429             ap[i__ * (i__ + 1) / 2 - 1] = pow[i__ * 2];
00430 /* L310: */
00431         }
00432 
00433         dppequ_("U", &n, ap, r__, &rcond, &norm, &info);
00434 
00435         if (info != 0) {
00436             reslts[3] = 1.;
00437         } else {
00438             if (n != 0) {
00439 /* Computing MAX */
00440                 d__2 = reslts[3], d__3 = (d__1 = (rcond - rpow[n - 1]) / rpow[
00441                         n - 1], abs(d__1));
00442                 reslts[3] = max(d__2,d__3);
00443 /* Computing MAX */
00444                 d__2 = reslts[3], d__3 = (d__1 = (norm - pow[n * 2]) / pow[n *
00445                          2], abs(d__1));
00446                 reslts[3] = max(d__2,d__3);
00447                 i__1 = n;
00448                 for (i__ = 1; i__ <= i__1; ++i__) {
00449 /* Computing MAX */
00450                     d__2 = reslts[3], d__3 = (d__1 = (r__[i__ - 1] - rpow[i__]
00451                             ) / rpow[i__], abs(d__1));
00452                     reslts[3] = max(d__2,d__3);
00453 /* L320: */
00454                 }
00455             }
00456         }
00457 
00458 /*        Lower triangular packed storage */
00459 
00460         i__1 = n * (n + 1) / 2;
00461         for (i__ = 1; i__ <= i__1; ++i__) {
00462             ap[i__ - 1] = 0.;
00463 /* L330: */
00464         }
00465         j = 1;
00466         i__1 = n;
00467         for (i__ = 1; i__ <= i__1; ++i__) {
00468             ap[j - 1] = pow[i__ * 2];
00469             j += n - i__ + 1;
00470 /* L340: */
00471         }
00472 
00473         dppequ_("L", &n, ap, r__, &rcond, &norm, &info);
00474 
00475         if (info != 0) {
00476             reslts[3] = 1.;
00477         } else {
00478             if (n != 0) {
00479 /* Computing MAX */
00480                 d__2 = reslts[3], d__3 = (d__1 = (rcond - rpow[n - 1]) / rpow[
00481                         n - 1], abs(d__1));
00482                 reslts[3] = max(d__2,d__3);
00483 /* Computing MAX */
00484                 d__2 = reslts[3], d__3 = (d__1 = (norm - pow[n * 2]) / pow[n *
00485                          2], abs(d__1));
00486                 reslts[3] = max(d__2,d__3);
00487                 i__1 = n;
00488                 for (i__ = 1; i__ <= i__1; ++i__) {
00489 /* Computing MAX */
00490                     d__2 = reslts[3], d__3 = (d__1 = (r__[i__ - 1] - rpow[i__]
00491                             ) / rpow[i__], abs(d__1));
00492                     reslts[3] = max(d__2,d__3);
00493 /* L350: */
00494                 }
00495             }
00496         }
00497 
00498 /* L360: */
00499     }
00500     i__ = 13;
00501     ap[i__ - 1] = -1.;
00502     dppequ_("L", &c__5, ap, r__, &rcond, &norm, &info);
00503     if (info != 4) {
00504         reslts[3] = 1.;
00505     }
00506     reslts[3] /= eps;
00507 
00508 /*     Test DPBEQU */
00509 
00510     for (n = 0; n <= 5; ++n) {
00511 /* Computing MAX */
00512         i__2 = n - 1;
00513         i__1 = max(i__2,0);
00514         for (kl = 0; kl <= i__1; ++kl) {
00515 
00516 /*           Test upper triangular storage */
00517 
00518             for (j = 1; j <= 5; ++j) {
00519                 for (i__ = 1; i__ <= 13; ++i__) {
00520                     ab[i__ + j * 13 - 14] = 0.;
00521 /* L370: */
00522                 }
00523 /* L380: */
00524             }
00525             i__2 = n;
00526             for (j = 1; j <= i__2; ++j) {
00527                 ab[kl + 1 + j * 13 - 14] = pow[j * 2];
00528 /* L390: */
00529             }
00530 
00531             dpbequ_("U", &n, &kl, ab, &c__13, r__, &rcond, &norm, &info);
00532 
00533             if (info != 0) {
00534                 reslts[4] = 1.;
00535             } else {
00536                 if (n != 0) {
00537 /* Computing MAX */
00538                     d__2 = reslts[4], d__3 = (d__1 = (rcond - rpow[n - 1]) / 
00539                             rpow[n - 1], abs(d__1));
00540                     reslts[4] = max(d__2,d__3);
00541 /* Computing MAX */
00542                     d__2 = reslts[4], d__3 = (d__1 = (norm - pow[n * 2]) / 
00543                             pow[n * 2], abs(d__1));
00544                     reslts[4] = max(d__2,d__3);
00545                     i__2 = n;
00546                     for (i__ = 1; i__ <= i__2; ++i__) {
00547 /* Computing MAX */
00548                         d__2 = reslts[4], d__3 = (d__1 = (r__[i__ - 1] - rpow[
00549                                 i__]) / rpow[i__], abs(d__1));
00550                         reslts[4] = max(d__2,d__3);
00551 /* L400: */
00552                     }
00553                 }
00554             }
00555             if (n != 0) {
00556 /* Computing MAX */
00557                 i__2 = n - 1;
00558                 ab[kl + 1 + max(i__2,1) * 13 - 14] = -1.;
00559                 dpbequ_("U", &n, &kl, ab, &c__13, r__, &rcond, &norm, &info);
00560 /* Computing MAX */
00561                 i__2 = n - 1;
00562                 if (info != max(i__2,1)) {
00563                     reslts[4] = 1.;
00564                 }
00565             }
00566 
00567 /*           Test lower triangular storage */
00568 
00569             for (j = 1; j <= 5; ++j) {
00570                 for (i__ = 1; i__ <= 13; ++i__) {
00571                     ab[i__ + j * 13 - 14] = 0.;
00572 /* L410: */
00573                 }
00574 /* L420: */
00575             }
00576             i__2 = n;
00577             for (j = 1; j <= i__2; ++j) {
00578                 ab[j * 13 - 13] = pow[j * 2];
00579 /* L430: */
00580             }
00581 
00582             dpbequ_("L", &n, &kl, ab, &c__13, r__, &rcond, &norm, &info);
00583 
00584             if (info != 0) {
00585                 reslts[4] = 1.;
00586             } else {
00587                 if (n != 0) {
00588 /* Computing MAX */
00589                     d__2 = reslts[4], d__3 = (d__1 = (rcond - rpow[n - 1]) / 
00590                             rpow[n - 1], abs(d__1));
00591                     reslts[4] = max(d__2,d__3);
00592 /* Computing MAX */
00593                     d__2 = reslts[4], d__3 = (d__1 = (norm - pow[n * 2]) / 
00594                             pow[n * 2], abs(d__1));
00595                     reslts[4] = max(d__2,d__3);
00596                     i__2 = n;
00597                     for (i__ = 1; i__ <= i__2; ++i__) {
00598 /* Computing MAX */
00599                         d__2 = reslts[4], d__3 = (d__1 = (r__[i__ - 1] - rpow[
00600                                 i__]) / rpow[i__], abs(d__1));
00601                         reslts[4] = max(d__2,d__3);
00602 /* L440: */
00603                     }
00604                 }
00605             }
00606             if (n != 0) {
00607 /* Computing MAX */
00608                 i__2 = n - 1;
00609                 ab[max(i__2,1) * 13 - 13] = -1.;
00610                 dpbequ_("L", &n, &kl, ab, &c__13, r__, &rcond, &norm, &info);
00611 /* Computing MAX */
00612                 i__2 = n - 1;
00613                 if (info != max(i__2,1)) {
00614                     reslts[4] = 1.;
00615                 }
00616             }
00617 /* L450: */
00618         }
00619 /* L460: */
00620     }
00621     reslts[4] /= eps;
00622     ok = reslts[0] <= *thresh && reslts[1] <= *thresh && reslts[2] <= *thresh 
00623             && reslts[3] <= *thresh && reslts[4] <= *thresh;
00624     io___25.ciunit = *nout;
00625     s_wsle(&io___25);
00626     e_wsle();
00627     if (ok) {
00628         io___26.ciunit = *nout;
00629         s_wsfe(&io___26);
00630         do_fio(&c__1, path, (ftnlen)3);
00631         e_wsfe();
00632     } else {
00633         if (reslts[0] > *thresh) {
00634             io___27.ciunit = *nout;
00635             s_wsfe(&io___27);
00636             do_fio(&c__1, (char *)&reslts[0], (ftnlen)sizeof(doublereal));
00637             do_fio(&c__1, (char *)&(*thresh), (ftnlen)sizeof(doublereal));
00638             e_wsfe();
00639         }
00640         if (reslts[1] > *thresh) {
00641             io___28.ciunit = *nout;
00642             s_wsfe(&io___28);
00643             do_fio(&c__1, (char *)&reslts[1], (ftnlen)sizeof(doublereal));
00644             do_fio(&c__1, (char *)&(*thresh), (ftnlen)sizeof(doublereal));
00645             e_wsfe();
00646         }
00647         if (reslts[2] > *thresh) {
00648             io___29.ciunit = *nout;
00649             s_wsfe(&io___29);
00650             do_fio(&c__1, (char *)&reslts[2], (ftnlen)sizeof(doublereal));
00651             do_fio(&c__1, (char *)&(*thresh), (ftnlen)sizeof(doublereal));
00652             e_wsfe();
00653         }
00654         if (reslts[3] > *thresh) {
00655             io___30.ciunit = *nout;
00656             s_wsfe(&io___30);
00657             do_fio(&c__1, (char *)&reslts[3], (ftnlen)sizeof(doublereal));
00658             do_fio(&c__1, (char *)&(*thresh), (ftnlen)sizeof(doublereal));
00659             e_wsfe();
00660         }
00661         if (reslts[4] > *thresh) {
00662             io___31.ciunit = *nout;
00663             s_wsfe(&io___31);
00664             do_fio(&c__1, (char *)&reslts[4], (ftnlen)sizeof(doublereal));
00665             do_fio(&c__1, (char *)&(*thresh), (ftnlen)sizeof(doublereal));
00666             e_wsfe();
00667         }
00668     }
00669     return 0;
00670 
00671 /*     End of DCHKEQ */
00672 
00673 } /* dchkeq_ */


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