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__16 = 16;
00019 static integer c__0 = 0;
00020 static integer c__1 = 1;
00021 static integer c__4 = 4;
00022 static integer c__5 = 5;
00023 static logical c_true = TRUE_;
00024 static integer c__2 = 2;
00025 static integer c__32 = 32;
00026 static integer c__3 = 3;
00027 static doublereal c_b64 = 1.;
00028
00029 int dget34_(doublereal *rmax, integer *lmax, integer *ninfo,
00030 integer *knt)
00031 {
00032
00033 doublereal d__1, d__2, d__3;
00034
00035
00036 double sqrt(doublereal), d_sign(doublereal *, doublereal *);
00037
00038
00039 integer i__, j;
00040 doublereal q[16] , t[16] , t1[16]
00041 ;
00042 integer ia, ib, ic;
00043 doublereal vm[2];
00044 integer ia11, ia12, ia21, ia22, ic11, ic12, ic21, ic22, iam, icm;
00045 doublereal val[9], eps, res;
00046 integer info;
00047 doublereal tnrm, work[32];
00048 extern int dhst01_(integer *, integer *, integer *,
00049 doublereal *, integer *, doublereal *, integer *, doublereal *,
00050 integer *, doublereal *, integer *, doublereal *), dcopy_(integer
00051 *, doublereal *, integer *, doublereal *, integer *), dlabad_(
00052 doublereal *, doublereal *);
00053 extern doublereal dlamch_(char *);
00054 extern int dlaexc_(logical *, integer *, doublereal *,
00055 integer *, doublereal *, integer *, integer *, integer *, integer
00056 *, doublereal *, integer *);
00057 doublereal bignum, smlnum, result[2];
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121 --ninfo;
00122
00123
00124 eps = dlamch_("P");
00125 smlnum = dlamch_("S") / eps;
00126 bignum = 1. / smlnum;
00127 dlabad_(&smlnum, &bignum);
00128
00129
00130
00131 val[0] = 0.;
00132 val[1] = sqrt(smlnum);
00133 val[2] = 1.;
00134 val[3] = 2.;
00135 val[4] = sqrt(bignum);
00136 val[5] = -sqrt(smlnum);
00137 val[6] = -1.;
00138 val[7] = -2.;
00139 val[8] = -sqrt(bignum);
00140 vm[0] = 1.;
00141 vm[1] = eps * 2. + 1.;
00142 dcopy_(&c__16, &val[3], &c__0, t, &c__1);
00143
00144 ninfo[1] = 0;
00145 ninfo[2] = 0;
00146 *knt = 0;
00147 *lmax = 0;
00148 *rmax = 0.;
00149
00150
00151
00152 for (ia = 1; ia <= 9; ++ia) {
00153 for (iam = 1; iam <= 2; ++iam) {
00154 for (ib = 1; ib <= 9; ++ib) {
00155 for (ic = 1; ic <= 9; ++ic) {
00156 t[0] = val[ia - 1] * vm[iam - 1];
00157 t[5] = val[ic - 1];
00158 t[4] = val[ib - 1];
00159 t[1] = 0.;
00160
00161 d__1 = abs(t[0]), d__2 = abs(t[5]), d__1 = max(d__1,d__2),
00162 d__2 = abs(t[4]);
00163 tnrm = max(d__1,d__2);
00164 dcopy_(&c__16, t, &c__1, t1, &c__1);
00165 dcopy_(&c__16, val, &c__0, q, &c__1);
00166 dcopy_(&c__4, &val[2], &c__0, q, &c__5);
00167 dlaexc_(&c_true, &c__2, t, &c__4, q, &c__4, &c__1, &c__1,
00168 &c__1, work, &info);
00169 if (info != 0) {
00170 ++ninfo[info];
00171 }
00172 dhst01_(&c__2, &c__1, &c__2, t1, &c__4, t, &c__4, q, &
00173 c__4, work, &c__32, result);
00174 res = result[0] + result[1];
00175 if (info != 0) {
00176 res += 1. / eps;
00177 }
00178 if (t[0] != t1[5]) {
00179 res += 1. / eps;
00180 }
00181 if (t[5] != t1[0]) {
00182 res += 1. / eps;
00183 }
00184 if (t[1] != 0.) {
00185 res += 1. / eps;
00186 }
00187 ++(*knt);
00188 if (res > *rmax) {
00189 *lmax = *knt;
00190 *rmax = res;
00191 }
00192
00193 }
00194
00195 }
00196
00197 }
00198
00199 }
00200
00201 for (ia = 1; ia <= 5; ++ia) {
00202 for (iam = 1; iam <= 2; ++iam) {
00203 for (ib = 1; ib <= 5; ++ib) {
00204 for (ic11 = 1; ic11 <= 5; ++ic11) {
00205 for (ic12 = 2; ic12 <= 5; ++ic12) {
00206 for (ic21 = 2; ic21 <= 4; ++ic21) {
00207 for (ic22 = -1; ic22 <= 1; ic22 += 2) {
00208 t[0] = val[ia - 1] * vm[iam - 1];
00209 t[4] = val[ib - 1];
00210 t[8] = val[ib - 1] * -2.;
00211 t[1] = 0.;
00212 t[5] = val[ic11 - 1];
00213 t[9] = val[ic12 - 1];
00214 t[2] = 0.;
00215 t[6] = -val[ic21 - 1];
00216 t[10] = val[ic11 - 1] * (doublereal) ic22;
00217
00218 d__1 = abs(t[0]), d__2 = abs(t[4]), d__1 =
00219 max(d__1,d__2), d__2 = abs(t[8]),
00220 d__1 = max(d__1,d__2), d__2 = abs(t[5]
00221 ), d__1 = max(d__1,d__2), d__2 = abs(
00222 t[9]), d__1 = max(d__1,d__2), d__2 =
00223 abs(t[6]), d__1 = max(d__1,d__2),
00224 d__2 = abs(t[10]);
00225 tnrm = max(d__1,d__2);
00226 dcopy_(&c__16, t, &c__1, t1, &c__1);
00227 dcopy_(&c__16, val, &c__0, q, &c__1);
00228 dcopy_(&c__4, &val[2], &c__0, q, &c__5);
00229 dlaexc_(&c_true, &c__3, t, &c__4, q, &c__4, &
00230 c__1, &c__1, &c__2, work, &info);
00231 if (info != 0) {
00232 ++ninfo[info];
00233 }
00234 dhst01_(&c__3, &c__1, &c__3, t1, &c__4, t, &
00235 c__4, q, &c__4, work, &c__32, result);
00236 res = result[0] + result[1];
00237 if (info == 0) {
00238 if (t1[0] != t[10]) {
00239 res += 1. / eps;
00240 }
00241 if (t[2] != 0.) {
00242 res += 1. / eps;
00243 }
00244 if (t[6] != 0.) {
00245 res += 1. / eps;
00246 }
00247 if (t[1] != 0. && (t[0] != t[5] || d_sign(
00248 &c_b64, &t[4]) == d_sign(&c_b64, &
00249 t[1]))) {
00250 res += 1. / eps;
00251 }
00252 }
00253 ++(*knt);
00254 if (res > *rmax) {
00255 *lmax = *knt;
00256 *rmax = res;
00257 }
00258
00259 }
00260
00261 }
00262
00263 }
00264
00265 }
00266
00267 }
00268
00269 }
00270
00271 }
00272
00273 for (ia11 = 1; ia11 <= 5; ++ia11) {
00274 for (ia12 = 2; ia12 <= 5; ++ia12) {
00275 for (ia21 = 2; ia21 <= 4; ++ia21) {
00276 for (ia22 = -1; ia22 <= 1; ia22 += 2) {
00277 for (icm = 1; icm <= 2; ++icm) {
00278 for (ib = 1; ib <= 5; ++ib) {
00279 for (ic = 1; ic <= 5; ++ic) {
00280 t[0] = val[ia11 - 1];
00281 t[4] = val[ia12 - 1];
00282 t[8] = val[ib - 1] * -2.;
00283 t[1] = -val[ia21 - 1];
00284 t[5] = val[ia11 - 1] * (doublereal) ia22;
00285 t[9] = val[ib - 1];
00286 t[2] = 0.;
00287 t[6] = 0.;
00288 t[10] = val[ic - 1] * vm[icm - 1];
00289
00290 d__1 = abs(t[0]), d__2 = abs(t[4]), d__1 =
00291 max(d__1,d__2), d__2 = abs(t[8]),
00292 d__1 = max(d__1,d__2), d__2 = abs(t[5]
00293 ), d__1 = max(d__1,d__2), d__2 = abs(
00294 t[9]), d__1 = max(d__1,d__2), d__2 =
00295 abs(t[6]), d__1 = max(d__1,d__2),
00296 d__2 = abs(t[10]);
00297 tnrm = max(d__1,d__2);
00298 dcopy_(&c__16, t, &c__1, t1, &c__1);
00299 dcopy_(&c__16, val, &c__0, q, &c__1);
00300 dcopy_(&c__4, &val[2], &c__0, q, &c__5);
00301 dlaexc_(&c_true, &c__3, t, &c__4, q, &c__4, &
00302 c__1, &c__2, &c__1, work, &info);
00303 if (info != 0) {
00304 ++ninfo[info];
00305 }
00306 dhst01_(&c__3, &c__1, &c__3, t1, &c__4, t, &
00307 c__4, q, &c__4, work, &c__32, result);
00308 res = result[0] + result[1];
00309 if (info == 0) {
00310 if (t1[10] != t[0]) {
00311 res += 1. / eps;
00312 }
00313 if (t[1] != 0.) {
00314 res += 1. / eps;
00315 }
00316 if (t[2] != 0.) {
00317 res += 1. / eps;
00318 }
00319 if (t[6] != 0. && (t[5] != t[10] ||
00320 d_sign(&c_b64, &t[9]) == d_sign(&
00321 c_b64, &t[6]))) {
00322 res += 1. / eps;
00323 }
00324 }
00325 ++(*knt);
00326 if (res > *rmax) {
00327 *lmax = *knt;
00328 *rmax = res;
00329 }
00330
00331 }
00332
00333 }
00334
00335 }
00336
00337 }
00338
00339 }
00340
00341 }
00342
00343 }
00344
00345 for (ia11 = 1; ia11 <= 5; ++ia11) {
00346 for (ia12 = 2; ia12 <= 5; ++ia12) {
00347 for (ia21 = 2; ia21 <= 4; ++ia21) {
00348 for (ia22 = -1; ia22 <= 1; ia22 += 2) {
00349 for (ib = 1; ib <= 5; ++ib) {
00350 for (ic11 = 3; ic11 <= 4; ++ic11) {
00351 for (ic12 = 3; ic12 <= 4; ++ic12) {
00352 for (ic21 = 3; ic21 <= 4; ++ic21) {
00353 for (ic22 = -1; ic22 <= 1; ic22 += 2) {
00354 for (icm = 5; icm <= 7; ++icm) {
00355 iam = 1;
00356 t[0] = val[ia11 - 1] * vm[iam - 1]
00357 ;
00358 t[4] = val[ia12 - 1] * vm[iam - 1]
00359 ;
00360 t[8] = val[ib - 1] * -2.;
00361 t[12] = val[ib - 1] * .5;
00362 t[1] = -t[4] * val[ia21 - 1];
00363 t[5] = val[ia11 - 1] * (
00364 doublereal) ia22 * vm[iam
00365 - 1];
00366 t[9] = val[ib - 1];
00367 t[13] = val[ib - 1] * 3.;
00368 t[2] = 0.;
00369 t[6] = 0.;
00370 t[10] = val[ic11 - 1] * (d__1 =
00371 val[icm - 1], abs(d__1));
00372 t[14] = val[ic12 - 1] * (d__1 =
00373 val[icm - 1], abs(d__1));
00374 t[3] = 0.;
00375 t[7] = 0.;
00376 t[11] = -t[14] * val[ic21 - 1] * (
00377 d__1 = val[icm - 1], abs(
00378 d__1));
00379 t[15] = val[ic11 - 1] * (
00380 doublereal) ic22 * (d__1 =
00381 val[icm - 1], abs(d__1));
00382 tnrm = 0.;
00383 for (i__ = 1; i__ <= 4; ++i__) {
00384 for (j = 1; j <= 4; ++j) {
00385
00386 d__2 = tnrm, d__3 = (d__1 = t[i__ + (j << 2) -
00387 5], abs(d__1));
00388 tnrm = max(d__2,d__3);
00389
00390 }
00391
00392 }
00393 dcopy_(&c__16, t, &c__1, t1, &
00394 c__1);
00395 dcopy_(&c__16, val, &c__0, q, &
00396 c__1);
00397 dcopy_(&c__4, &val[2], &c__0, q, &
00398 c__5);
00399 dlaexc_(&c_true, &c__4, t, &c__4,
00400 q, &c__4, &c__1, &c__2, &
00401 c__2, work, &info);
00402 if (info != 0) {
00403 ++ninfo[info];
00404 }
00405 dhst01_(&c__4, &c__1, &c__4, t1, &
00406 c__4, t, &c__4, q, &c__4,
00407 work, &c__32, result);
00408 res = result[0] + result[1];
00409 if (info == 0) {
00410 if (t[2] != 0.) {
00411 res += 1. / eps;
00412 }
00413 if (t[3] != 0.) {
00414 res += 1. / eps;
00415 }
00416 if (t[6] != 0.) {
00417 res += 1. / eps;
00418 }
00419 if (t[7] != 0.) {
00420 res += 1. / eps;
00421 }
00422 if (t[1] != 0. && (t[0] != t[5] || d_sign(&c_b64, &
00423 t[4]) == d_sign(&c_b64, &t[1]))) {
00424 res += 1. / eps;
00425 }
00426 if (t[11] != 0. && (t[10] != t[15] || d_sign(&c_b64,
00427 &t[14]) == d_sign(&c_b64, &t[11]))) {
00428 res += 1. / eps;
00429 }
00430 }
00431 ++(*knt);
00432 if (res > *rmax) {
00433 *lmax = *knt;
00434 *rmax = res;
00435 }
00436
00437 }
00438
00439 }
00440
00441 }
00442
00443 }
00444
00445 }
00446
00447 }
00448
00449 }
00450
00451 }
00452
00453 }
00454
00455 }
00456
00457 return 0;
00458
00459
00460
00461 }