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