79int wofz(xi, yi, u, v, flag__)
85 doublereal d__1, d__2;
95 static doublereal xabs, yabs, daux, qrho, xaux, xsum, ysum;
97 static doublereal c__, h__;
98 static integer i__, j, n;
99 static doublereal x, y, xabsq, xquad, yquad, h2, u1, v1, u2, v2, w1;
101 static doublereal rx, ry, sx, sy, tx, ty;
103 static doublereal qlambda;
153 x = xabs / (float)6.3;
154 y = yabs / (float)4.4;
159 if (xabs > 5e153 || yabs > 5e153) {
167 qrho = d__1 * d__1 + d__2 * d__2;
174 xquad = xabsq - d__1 * d__1;
175 yquad = xabs * 2 * yabs;
187 qrho = (1 - y * (float).85) * sqrt(qrho);
188 d__1 = qrho * 72 + 6;
191 xsum = (float)1. / j;
193 for (i__ = n; i__ >= 1; --i__) {
195 xaux = (xsum * xquad - ysum * yquad) / i__;
196 ysum = (xsum * yquad + ysum * xquad) / i__;
197 xsum = xaux + (float)1. / j;
200 u1 = (xsum * yabs + ysum * xabs) * -1.12837916709551257388 + (
float)1.;
201 v1 = (xsum * xabs - ysum * yabs) * 1.12837916709551257388;
203 u2 = daux * cos(yquad);
204 v2 = -daux * sin(yquad);
206 *u = u1 * u2 - v1 * v2;
207 *v = u1 * v2 + v1 * u2;
228 if (qrho > (
float)1.) {
232 nu = (integer)(1442 / (qrho * 26 + 77) + 3);
234 qrho = (1 - y) * sqrt(1 - qrho);
235 h__ = qrho * (float)1.88;
237 d__1 = qrho * 34 + 7;
238 kapn = i_dnnt(&d__1);
239 d__1 = qrho * 26 + 16;
246 qlambda = pow_di(&h2, &kapn);
254 for (n = nu; n >= 0; --n) {
256 tx = yabs + h__ + np1 * rx;
257 ty = xabs - np1 * ry;
262 c__ = (float).5 / (d__1 * d__1 + d__2 * d__2);
265 if (b && n <= kapn) {
267 sx = rx * tx - ry * sy;
268 sy = ry * tx + rx * sy;
274 if (h__ == (
float)0.) {
275 *u = rx * 1.12837916709551257388;
276 *v = ry * 1.12837916709551257388;
278 *u = sx * 1.12837916709551257388;
279 *v = sy * 1.12837916709551257388;
282 if (yabs == (
float)0.) {
285 *u = exp(-(d__1 * d__1));
291 if (*yi < (
float)0.) {
302 if (yquad > 3537118876014220. || xquad > 708.503061461606) {
307 u2 = w1 * cos(yquad);
308 v2 = -w1 * sin(yquad);
313 if (*xi > (
float)0.) {
317 if (*xi < (
float)0.) {
int wofz(doublereal *xi, doublereal *yi, doublereal *u, doublereal *v, logical *flag__)
Computes the complex error function for a given complex number .