00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015
00016
00017
00018 static integer c__10 = 10;
00019 static integer c__2 = 2;
00020 static integer c__3 = 3;
00021 static integer c__1 = 1;
00022 static integer c__4 = 4;
00023 static integer c__5 = 5;
00024 static integer c__6 = 6;
00025 static integer c__7 = 7;
00026 static integer c__8 = 8;
00027
00028 int zebchvxx_(doublereal *thresh, char *path)
00029 {
00030
00031 static char fmt_8000[] = "(\002 Z\002,a2,\002SVXX: N =\002,i2,\002, INFO"
00032 " = \002,i3,\002, ORCOND = \002,g12.5,\002, real RCOND = \002,g12"
00033 ".5)";
00034 static char fmt_9996[] = "(3x,i2,\002: Normwise guaranteed forward erro"
00035 "r\002,/5x,\002Guaranteed case: if norm ( abs( Xc - Xt )\002,\002"
00036 " / norm ( Xt ) .LE. ERRBND( *, nwise_i, bnd_i ), then\002,/5x"
00037 ",\002ERRBND( *, nwise_i, bnd_i ) .LE. MAX(SQRT(N), 10) * EPS\002)"
00038 ;
00039 static char fmt_9995[] = "(3x,i2,\002: Componentwise guaranteed forward "
00040 "error\002)";
00041 static char fmt_9994[] = "(3x,i2,\002: Backwards error\002)";
00042 static char fmt_9993[] = "(3x,i2,\002: Reciprocal condition number\002)";
00043 static char fmt_9992[] = "(3x,i2,\002: Reciprocal normwise condition num"
00044 "ber\002)";
00045 static char fmt_9991[] = "(3x,i2,\002: Raw normwise error estimate\002)";
00046 static char fmt_9990[] = "(3x,i2,\002: Reciprocal componentwise conditio"
00047 "n number\002)";
00048 static char fmt_9989[] = "(3x,i2,\002: Raw componentwise error estimat"
00049 "e\002)";
00050 static char fmt_9999[] = "(\002 Z\002,a2,\002SVXX: N =\002,i2,\002, RHS "
00051 "= \002,i2,\002, NWISE GUAR. = \002,a,\002, CWISE GUAR. = \002,a"
00052 ",\002 test(\002,i1,\002) =\002,g12.5)";
00053 static char fmt_9998[] = "(\002 Z\002,a2,\002SVXX: \002,i6,\002 out of"
00054 " \002,i6,\002 tests failed to pass the threshold\002)";
00055 static char fmt_9997[] = "(\002 Z\002,a2,\002SVXX passed the tests of er"
00056 "ror bounds\002)";
00057
00058
00059 integer i__1, i__2, i__3, i__4, i__5, i__6;
00060 doublereal d__1, d__2, d__3, d__4, d__5;
00061 doublecomplex z__1, z__2, z__3;
00062
00063
00064 int s_copy(char *, char *, ftnlen, ftnlen);
00065 double sqrt(doublereal);
00066 integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00067 double d_imag(doublecomplex *);
00068 void z_div(doublecomplex *, doublecomplex *, doublecomplex *);
00069 integer s_wsle(cilist *), e_wsle(void);
00070
00071
00072 extern int zposvxx_(char *, char *, integer *, integer *,
00073 doublecomplex *, integer *, doublecomplex *, integer *, char *,
00074 doublereal *, doublecomplex *, integer *, doublecomplex *,
00075 integer *, doublereal *, doublereal *, doublereal *, integer *,
00076 doublereal *, doublereal *, integer *, doublereal *,
00077 doublecomplex *, doublereal *, integer *);
00078 doublereal errbnd_c__[30];
00079 extern int zsysvxx_(char *, char *, integer *, integer *,
00080 doublecomplex *, integer *, doublecomplex *, integer *, integer *
00081 , char *, doublereal *, doublecomplex *, integer *, doublecomplex
00082 *, integer *, doublereal *, doublereal *, doublereal *, integer *,
00083 doublereal *, doublereal *, integer *, doublereal *,
00084 doublecomplex *, doublereal *, integer *);
00085 doublereal errbnd_n__[30];
00086 doublecomplex a[100] , b[100]
00087 ;
00088 doublereal c__[10];
00089 integer i__, j, k;
00090 doublereal m;
00091 integer n;
00092 doublereal r__[10], s[10];
00093 doublecomplex x[100] ;
00094 doublereal cwise_bnd__;
00095 char c2[2];
00096 doublereal nwise_bnd__, cwise_err__, nwise_err__, errthresh;
00097 doublecomplex ab[190] , af[100]
00098 ;
00099 integer kl, ku;
00100 doublereal condthresh;
00101 doublecomplex afb[280] ;
00102 integer lda;
00103 doublereal eps, cwise_rcond__, nwise_rcond__;
00104 integer n_aux_tests__, ldab;
00105 doublereal diff[100] ;
00106 char fact[1];
00107 doublereal berr[10];
00108 integer info, ipiv[10], nrhs;
00109 doublereal rinv[10];
00110 char uplo[1];
00111 doublecomplex work[150];
00112 doublereal sumr;
00113 integer ldafb;
00114 doublereal ccond;
00115 integer nfail;
00116 char cguar[3];
00117 doublereal ncond;
00118 char equed[1];
00119 doublereal rcond;
00120 doublecomplex acopy[100] ;
00121 char nguar[3], trans[1];
00122 doublereal rnorm, normt, sumri, rwork[30];
00123 logical printed_guide__;
00124 extern doublereal dlamch_(char *);
00125 doublecomplex abcopy[190] ;
00126 extern logical lsamen_(integer *, char *, char *);
00127 doublereal params[2], orcond;
00128 extern int zlacpy_(char *, integer *, integer *,
00129 doublecomplex *, integer *, doublecomplex *, integer *);
00130 doublereal rinorm, tstrat[6], rpvgrw;
00131 extern int zlahilb_(integer *, integer *, doublecomplex *
00132 , integer *, doublecomplex *, integer *, doublecomplex *, integer
00133 *, doublecomplex *, integer *, char *);
00134 doublecomplex invhilb[100] ;
00135 doublereal normdif;
00136 extern int zgbsvxx_(char *, char *, integer *, integer *,
00137 integer *, integer *, doublecomplex *, integer *, doublecomplex *
00138 , integer *, integer *, char *, doublereal *, doublereal *,
00139 doublecomplex *, integer *, doublecomplex *, integer *,
00140 doublereal *, doublereal *, doublereal *, integer *, doublereal *,
00141 doublereal *, integer *, doublereal *, doublecomplex *,
00142 doublereal *, integer *), zgesvxx_(char *,
00143 char *, integer *, integer *, doublecomplex *, integer *,
00144 doublecomplex *, integer *, integer *, char *, doublereal *,
00145 doublereal *, doublecomplex *, integer *, doublecomplex *,
00146 integer *, doublereal *, doublereal *, doublereal *, integer *,
00147 doublereal *, doublereal *, integer *, doublereal *,
00148 doublecomplex *, doublereal *, integer *),
00149 zhesvxx_(char *, char *, integer *, integer *, doublecomplex *,
00150 integer *, doublecomplex *, integer *, integer *, char *,
00151 doublereal *, doublecomplex *, integer *, doublecomplex *,
00152 integer *, doublereal *, doublereal *, doublereal *, integer *,
00153 doublereal *, doublereal *, integer *, doublereal *,
00154 doublecomplex *, doublereal *, integer *);
00155
00156
00157 static cilist io___42 = { 0, 6, 0, fmt_8000, 0 };
00158 static cilist io___66 = { 0, 6, 0, 0, 0 };
00159 static cilist io___67 = { 0, 6, 0, fmt_9996, 0 };
00160 static cilist io___68 = { 0, 6, 0, fmt_9995, 0 };
00161 static cilist io___69 = { 0, 6, 0, fmt_9994, 0 };
00162 static cilist io___70 = { 0, 6, 0, fmt_9993, 0 };
00163 static cilist io___71 = { 0, 6, 0, fmt_9992, 0 };
00164 static cilist io___72 = { 0, 6, 0, fmt_9991, 0 };
00165 static cilist io___73 = { 0, 6, 0, fmt_9990, 0 };
00166 static cilist io___74 = { 0, 6, 0, fmt_9989, 0 };
00167 static cilist io___75 = { 0, 6, 0, 0, 0 };
00168 static cilist io___76 = { 0, 6, 0, fmt_9999, 0 };
00169 static cilist io___77 = { 0, 6, 0, 0, 0 };
00170 static cilist io___78 = { 0, 6, 0, fmt_9998, 0 };
00171 static cilist io___79 = { 0, 6, 0, fmt_9997, 0 };
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245 *(unsigned char *)fact = 'E';
00246 *(unsigned char *)uplo = 'U';
00247 *(unsigned char *)trans = 'N';
00248 *(unsigned char *)equed = 'N';
00249 eps = dlamch_("Epsilon");
00250 nfail = 0;
00251 n_aux_tests__ = 0;
00252 lda = 10;
00253 ldab = 19;
00254 ldafb = 28;
00255 s_copy(c2, path + 1, (ftnlen)2, (ftnlen)2);
00256
00257 printed_guide__ = FALSE_;
00258 for (n = 1; n <= 10; ++n) {
00259 params[0] = -1.;
00260 params[1] = -1.;
00261 kl = n - 1;
00262 ku = n - 1;
00263 nrhs = n;
00264
00265 d__1 = sqrt((doublereal) n);
00266 m = max(d__1,10.);
00267
00268
00269 zlahilb_(&n, &n, a, &lda, invhilb, &lda, b, &lda, work, &info, path);
00270
00271 zlacpy_("ALL", &n, &n, a, &c__10, acopy, &c__10);
00272
00273 i__1 = n;
00274 for (j = 1; j <= i__1; ++j) {
00275 i__2 = kl + ku + 1;
00276 for (i__ = 1; i__ <= i__2; ++i__) {
00277 i__3 = i__ + j * 19 - 20;
00278 ab[i__3].r = 0., ab[i__3].i = 0.;
00279 }
00280 }
00281 i__1 = n;
00282 for (j = 1; j <= i__1; ++j) {
00283
00284 i__2 = 1, i__3 = j - ku;
00285
00286 i__5 = n, i__6 = j + kl;
00287 i__4 = min(i__5,i__6);
00288 for (i__ = max(i__2,i__3); i__ <= i__4; ++i__) {
00289 i__2 = ku + 1 + i__ - j + j * 19 - 20;
00290 i__3 = i__ + j * 10 - 11;
00291 ab[i__2].r = a[i__3].r, ab[i__2].i = a[i__3].i;
00292 }
00293 }
00294
00295 i__1 = n;
00296 for (j = 1; j <= i__1; ++j) {
00297 i__4 = kl + ku + 1;
00298 for (i__ = 1; i__ <= i__4; ++i__) {
00299 i__2 = i__ + j * 19 - 20;
00300 abcopy[i__2].r = 0., abcopy[i__2].i = 0.;
00301 }
00302 }
00303 i__1 = kl + ku + 1;
00304 zlacpy_("ALL", &i__1, &n, ab, &ldab, abcopy, &ldab);
00305
00306 if (lsamen_(&c__2, c2, "SY")) {
00307 zsysvxx_(fact, uplo, &n, &nrhs, acopy, &lda, af, &lda, ipiv,
00308 equed, s, b, &lda, x, &lda, &orcond, &rpvgrw, berr, &c__3,
00309 errbnd_n__, errbnd_c__, &c__2, params, work, rwork, &
00310 info);
00311 } else if (lsamen_(&c__2, c2, "PO")) {
00312 zposvxx_(fact, uplo, &n, &nrhs, acopy, &lda, af, &lda, equed, s,
00313 b, &lda, x, &lda, &orcond, &rpvgrw, berr, &c__3,
00314 errbnd_n__, errbnd_c__, &c__2, params, work, rwork, &info);
00315 } else if (lsamen_(&c__2, c2, "HE")) {
00316 zhesvxx_(fact, uplo, &n, &nrhs, acopy, &lda, af, &lda, ipiv,
00317 equed, s, b, &lda, x, &lda, &orcond, &rpvgrw, berr, &c__3,
00318 errbnd_n__, errbnd_c__, &c__2, params, work, rwork, &
00319 info);
00320 } else if (lsamen_(&c__2, c2, "GB")) {
00321 zgbsvxx_(fact, trans, &n, &kl, &ku, &nrhs, abcopy, &ldab, afb, &
00322 ldafb, ipiv, equed, r__, c__, b, &lda, x, &lda, &orcond, &
00323 rpvgrw, berr, &c__3, errbnd_n__, errbnd_c__, &c__2,
00324 params, work, rwork, &info);
00325 } else {
00326 zgesvxx_(fact, trans, &n, &nrhs, acopy, &lda, af, &lda, ipiv,
00327 equed, r__, c__, b, &lda, x, &lda, &orcond, &rpvgrw, berr,
00328 &c__3, errbnd_n__, errbnd_c__, &c__2, params, work,
00329 rwork, &info);
00330 }
00331 ++n_aux_tests__;
00332 if (orcond < eps) {
00333
00334
00335
00336
00337
00338
00339 } else {
00340
00341
00342 if (info > 0 && info <= n + 1) {
00343 ++nfail;
00344 s_wsfe(&io___42);
00345 do_fio(&c__1, c2, (ftnlen)2);
00346 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00347 do_fio(&c__1, (char *)&info, (ftnlen)sizeof(integer));
00348 do_fio(&c__1, (char *)&orcond, (ftnlen)sizeof(doublereal));
00349 do_fio(&c__1, (char *)&rcond, (ftnlen)sizeof(doublereal));
00350 e_wsfe();
00351 }
00352 }
00353
00354 i__1 = n;
00355 for (i__ = 1; i__ <= i__1; ++i__) {
00356 i__4 = nrhs;
00357 for (j = 1; j <= i__4; ++j) {
00358 i__2 = i__ + j * 10 - 11;
00359 i__3 = i__ + j * 10 - 11;
00360 i__5 = i__ + j * 10 - 11;
00361 z__1.r = x[i__3].r - invhilb[i__5].r, z__1.i = x[i__3].i -
00362 invhilb[i__5].i;
00363 diff[i__2] = z__1.r;
00364 }
00365 }
00366
00367 rnorm = 0.;
00368 rinorm = 0.;
00369 if (lsamen_(&c__2, c2, "PO") || lsamen_(&c__2,
00370 c2, "SY") || lsamen_(&c__2, c2, "HE")) {
00371 i__1 = n;
00372 for (i__ = 1; i__ <= i__1; ++i__) {
00373 sumr = 0.;
00374 sumri = 0.;
00375 i__4 = n;
00376 for (j = 1; j <= i__4; ++j) {
00377 i__2 = i__ + j * 10 - 11;
00378 sumr += s[i__ - 1] * ((d__1 = a[i__2].r, abs(d__1)) + (
00379 d__2 = d_imag(&a[i__ + j * 10 - 11]), abs(d__2)))
00380 * s[j - 1];
00381 i__2 = i__ + j * 10 - 11;
00382 sumri += ((d__1 = invhilb[i__2].r, abs(d__1)) + (d__2 =
00383 d_imag(&invhilb[i__ + j * 10 - 11]), abs(d__2))) /
00384 (s[j - 1] * s[i__ - 1]);
00385 }
00386 rnorm = max(rnorm,sumr);
00387 rinorm = max(rinorm,sumri);
00388 }
00389 } else if (lsamen_(&c__2, c2, "GE") || lsamen_(&
00390 c__2, c2, "GB")) {
00391 i__1 = n;
00392 for (i__ = 1; i__ <= i__1; ++i__) {
00393 sumr = 0.;
00394 sumri = 0.;
00395 i__4 = n;
00396 for (j = 1; j <= i__4; ++j) {
00397 i__2 = i__ + j * 10 - 11;
00398 sumr += r__[i__ - 1] * ((d__1 = a[i__2].r, abs(d__1)) + (
00399 d__2 = d_imag(&a[i__ + j * 10 - 11]), abs(d__2)))
00400 * c__[j - 1];
00401 i__2 = i__ + j * 10 - 11;
00402 sumri += ((d__1 = invhilb[i__2].r, abs(d__1)) + (d__2 =
00403 d_imag(&invhilb[i__ + j * 10 - 11]), abs(d__2))) /
00404 (r__[j - 1] * c__[i__ - 1]);
00405 }
00406 rnorm = max(rnorm,sumr);
00407 rinorm = max(rinorm,sumri);
00408 }
00409 }
00410 rnorm /= (d__1 = a[0].r, abs(d__1)) + (d__2 = d_imag(a), abs(d__2));
00411 rcond = 1. / (rnorm * rinorm);
00412
00413 i__1 = n;
00414 for (i__ = 1; i__ <= i__1; ++i__) {
00415 rinv[i__ - 1] = 0.;
00416 }
00417 i__1 = n;
00418 for (j = 1; j <= i__1; ++j) {
00419 i__4 = n;
00420 for (i__ = 1; i__ <= i__4; ++i__) {
00421 i__2 = i__ + j * 10 - 11;
00422 rinv[i__ - 1] += (d__1 = a[i__2].r, abs(d__1)) + (d__2 =
00423 d_imag(&a[i__ + j * 10 - 11]), abs(d__2));
00424 }
00425 }
00426
00427 rinorm = 0.;
00428 i__1 = n;
00429 for (i__ = 1; i__ <= i__1; ++i__) {
00430 sumri = 0.;
00431 i__4 = n;
00432 for (j = 1; j <= i__4; ++j) {
00433 i__2 = i__ + j * 10 - 11;
00434 i__3 = j - 1;
00435 z__2.r = rinv[i__3] * invhilb[i__2].r, z__2.i = rinv[i__3] *
00436 invhilb[i__2].i;
00437 z__1.r = z__2.r, z__1.i = z__2.i;
00438 sumri += (d__1 = z__1.r, abs(d__1)) + (d__2 = d_imag(&z__1),
00439 abs(d__2));
00440 }
00441 rinorm = max(rinorm,sumri);
00442 }
00443
00444
00445 ncond = ((d__1 = a[0].r, abs(d__1)) + (d__2 = d_imag(a), abs(d__2))) /
00446 rinorm;
00447 condthresh = m * eps;
00448 errthresh = m * eps;
00449 i__1 = nrhs;
00450 for (k = 1; k <= i__1; ++k) {
00451 normt = 0.;
00452 normdif = 0.;
00453 cwise_err__ = 0.;
00454 i__4 = n;
00455 for (i__ = 1; i__ <= i__4; ++i__) {
00456
00457 i__2 = i__ + k * 10 - 11;
00458 d__3 = (d__1 = invhilb[i__2].r, abs(d__1)) + (d__2 = d_imag(&
00459 invhilb[i__ + k * 10 - 11]), abs(d__2));
00460 normt = max(d__3,normt);
00461 i__2 = i__ + k * 10 - 11;
00462 i__3 = i__ + k * 10 - 11;
00463 z__2.r = x[i__2].r - invhilb[i__3].r, z__2.i = x[i__2].i -
00464 invhilb[i__3].i;
00465 z__1.r = z__2.r, z__1.i = z__2.i;
00466
00467 d__3 = (d__1 = z__1.r, abs(d__1)) + (d__2 = d_imag(&z__1),
00468 abs(d__2));
00469 normdif = max(d__3,normdif);
00470 i__2 = i__ + k * 10 - 11;
00471 if (invhilb[i__2].r != 0. || invhilb[i__2].i != 0.) {
00472 i__2 = i__ + k * 10 - 11;
00473 i__3 = i__ + k * 10 - 11;
00474 z__2.r = x[i__2].r - invhilb[i__3].r, z__2.i = x[i__2].i
00475 - invhilb[i__3].i;
00476 z__1.r = z__2.r, z__1.i = z__2.i;
00477
00478 i__5 = i__ + k * 10 - 11;
00479 d__5 = ((d__1 = z__1.r, abs(d__1)) + (d__2 = d_imag(&z__1)
00480 , abs(d__2))) / ((d__3 = invhilb[i__5].r, abs(
00481 d__3)) + (d__4 = d_imag(&invhilb[i__ + k * 10 -
00482 11]), abs(d__4)));
00483 cwise_err__ = max(d__5,cwise_err__);
00484 } else {
00485 i__2 = i__ + k * 10 - 11;
00486 if (x[i__2].r != 0. || x[i__2].i != 0.) {
00487 cwise_err__ = dlamch_("OVERFLOW");
00488 }
00489 }
00490 }
00491 if (normt != 0.) {
00492 nwise_err__ = normdif / normt;
00493 } else if (normdif != 0.) {
00494 nwise_err__ = dlamch_("OVERFLOW");
00495 } else {
00496 nwise_err__ = 0.;
00497 }
00498 i__4 = n;
00499 for (i__ = 1; i__ <= i__4; ++i__) {
00500 rinv[i__ - 1] = 0.;
00501 }
00502 i__4 = n;
00503 for (j = 1; j <= i__4; ++j) {
00504 i__2 = n;
00505 for (i__ = 1; i__ <= i__2; ++i__) {
00506 i__3 = i__ + j * 10 - 11;
00507 i__5 = j + k * 10 - 11;
00508 z__2.r = a[i__3].r * invhilb[i__5].r - a[i__3].i *
00509 invhilb[i__5].i, z__2.i = a[i__3].r * invhilb[
00510 i__5].i + a[i__3].i * invhilb[i__5].r;
00511 z__1.r = z__2.r, z__1.i = z__2.i;
00512 rinv[i__ - 1] += (d__1 = z__1.r, abs(d__1)) + (d__2 =
00513 d_imag(&z__1), abs(d__2));
00514 }
00515 }
00516 rinorm = 0.;
00517 i__4 = n;
00518 for (i__ = 1; i__ <= i__4; ++i__) {
00519 sumri = 0.;
00520 i__2 = n;
00521 for (j = 1; j <= i__2; ++j) {
00522 i__3 = i__ + j * 10 - 11;
00523 i__5 = j - 1;
00524 z__3.r = rinv[i__5] * invhilb[i__3].r, z__3.i = rinv[i__5]
00525 * invhilb[i__3].i;
00526 z_div(&z__2, &z__3, &invhilb[i__ + k * 10 - 11]);
00527 z__1.r = z__2.r, z__1.i = z__2.i;
00528 sumri += (d__1 = z__1.r, abs(d__1)) + (d__2 = d_imag(&
00529 z__1), abs(d__2));
00530 }
00531 rinorm = max(rinorm,sumri);
00532 }
00533
00534
00535 ccond = ((d__1 = a[0].r, abs(d__1)) + (d__2 = d_imag(a), abs(d__2)
00536 )) / rinorm;
00537
00538 nwise_bnd__ = errbnd_n__[k + nrhs - 1];
00539 cwise_bnd__ = errbnd_c__[k + nrhs - 1];
00540 nwise_rcond__ = errbnd_n__[k + (nrhs << 1) - 1];
00541 cwise_rcond__ = errbnd_c__[k + (nrhs << 1) - 1];
00542
00543
00544
00545 if (ncond >= condthresh) {
00546 s_copy(nguar, "YES", (ftnlen)3, (ftnlen)3);
00547 if (nwise_bnd__ > errthresh) {
00548 tstrat[0] = 1 / (eps * 2.);
00549 } else {
00550 if (nwise_bnd__ != 0.) {
00551 tstrat[0] = nwise_err__ / nwise_bnd__;
00552 } else if (nwise_err__ != 0.) {
00553 tstrat[0] = 1 / (eps * 16.f);
00554 } else {
00555 tstrat[0] = 0.;
00556 }
00557 if (tstrat[0] > 1.) {
00558 tstrat[0] = 1 / (eps * 4.);
00559 }
00560 }
00561 } else {
00562 s_copy(nguar, "NO", (ftnlen)3, (ftnlen)2);
00563 if (nwise_bnd__ < 1.) {
00564 tstrat[0] = 1 / (eps * 8.);
00565 } else {
00566 tstrat[0] = 1.;
00567 }
00568 }
00569
00570
00571
00572 if (ccond >= condthresh) {
00573 s_copy(cguar, "YES", (ftnlen)3, (ftnlen)3);
00574 if (cwise_bnd__ > errthresh) {
00575 tstrat[1] = 1 / (eps * 2.);
00576 } else {
00577 if (cwise_bnd__ != 0.) {
00578 tstrat[1] = cwise_err__ / cwise_bnd__;
00579 } else if (cwise_err__ != 0.) {
00580 tstrat[1] = 1 / (eps * 16.);
00581 } else {
00582 tstrat[1] = 0.;
00583 }
00584 if (tstrat[1] > 1.) {
00585 tstrat[1] = 1 / (eps * 4.);
00586 }
00587 }
00588 } else {
00589 s_copy(cguar, "NO", (ftnlen)3, (ftnlen)2);
00590 if (cwise_bnd__ < 1.) {
00591 tstrat[1] = 1 / (eps * 8.);
00592 } else {
00593 tstrat[1] = 1.;
00594 }
00595 }
00596
00597 tstrat[2] = berr[k - 1] / eps;
00598
00599 tstrat[3] = rcond / orcond;
00600 if (rcond >= condthresh && tstrat[3] < 1.) {
00601 tstrat[3] = 1. / tstrat[3];
00602 }
00603 tstrat[4] = ncond / nwise_rcond__;
00604 if (ncond >= condthresh && tstrat[4] < 1.) {
00605 tstrat[4] = 1. / tstrat[4];
00606 }
00607 tstrat[5] = ccond / nwise_rcond__;
00608 if (ccond >= condthresh && tstrat[5] < 1.) {
00609 tstrat[5] = 1. / tstrat[5];
00610 }
00611 for (i__ = 1; i__ <= 6; ++i__) {
00612 if (tstrat[i__ - 1] > *thresh) {
00613 if (! printed_guide__) {
00614 s_wsle(&io___66);
00615 e_wsle();
00616 s_wsfe(&io___67);
00617 do_fio(&c__1, (char *)&c__1, (ftnlen)sizeof(integer));
00618 e_wsfe();
00619 s_wsfe(&io___68);
00620 do_fio(&c__1, (char *)&c__2, (ftnlen)sizeof(integer));
00621 e_wsfe();
00622 s_wsfe(&io___69);
00623 do_fio(&c__1, (char *)&c__3, (ftnlen)sizeof(integer));
00624 e_wsfe();
00625 s_wsfe(&io___70);
00626 do_fio(&c__1, (char *)&c__4, (ftnlen)sizeof(integer));
00627 e_wsfe();
00628 s_wsfe(&io___71);
00629 do_fio(&c__1, (char *)&c__5, (ftnlen)sizeof(integer));
00630 e_wsfe();
00631 s_wsfe(&io___72);
00632 do_fio(&c__1, (char *)&c__6, (ftnlen)sizeof(integer));
00633 e_wsfe();
00634 s_wsfe(&io___73);
00635 do_fio(&c__1, (char *)&c__7, (ftnlen)sizeof(integer));
00636 e_wsfe();
00637 s_wsfe(&io___74);
00638 do_fio(&c__1, (char *)&c__8, (ftnlen)sizeof(integer));
00639 e_wsfe();
00640 s_wsle(&io___75);
00641 e_wsle();
00642 printed_guide__ = TRUE_;
00643 }
00644 s_wsfe(&io___76);
00645 do_fio(&c__1, c2, (ftnlen)2);
00646 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00647 do_fio(&c__1, (char *)&k, (ftnlen)sizeof(integer));
00648 do_fio(&c__1, nguar, (ftnlen)3);
00649 do_fio(&c__1, cguar, (ftnlen)3);
00650 do_fio(&c__1, (char *)&i__, (ftnlen)sizeof(integer));
00651 do_fio(&c__1, (char *)&tstrat[i__ - 1], (ftnlen)sizeof(
00652 doublereal));
00653 e_wsfe();
00654 ++nfail;
00655 }
00656 }
00657 }
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671 }
00672 s_wsle(&io___77);
00673 e_wsle();
00674 if (nfail > 0) {
00675 s_wsfe(&io___78);
00676 do_fio(&c__1, c2, (ftnlen)2);
00677 do_fio(&c__1, (char *)&nfail, (ftnlen)sizeof(integer));
00678 i__1 = n * 6 + n_aux_tests__;
00679 do_fio(&c__1, (char *)&i__1, (ftnlen)sizeof(integer));
00680 e_wsfe();
00681 } else {
00682 s_wsfe(&io___79);
00683 do_fio(&c__1, c2, (ftnlen)2);
00684 e_wsfe();
00685 }
00686
00687 return 0;
00688 }