83{
84
85 doublereal d__1, d__2;
86
87
88
89
90
91
92
93
94 static integer kapn;
95 static doublereal xabs, yabs, daux, qrho, xaux, xsum, ysum;
96 static logical a, b;
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;
100 static integer nu;
101 static doublereal rx, ry, sx, sy, tx, ty;
102 static integer np1;
103 static doublereal qlambda;
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149 *flag__ = FALSE_;
150
151 xabs = abs(*xi);
152 yabs = abs(*yi);
153 x = xabs / (float)6.3;
154 y = yabs / (float)4.4;
155
156
157
158
159 if (xabs > 5e153 || yabs > 5e153) {
160 goto L100;
161 }
162
163
164 d__1 = x;
165
166 d__2 = y;
167 qrho = d__1 * d__1 + d__2 * d__2;
168
169
170 d__1 = xabs;
171 xabsq = d__1 * d__1;
172
173 d__1 = yabs;
174 xquad = xabsq - d__1 * d__1;
175 yquad = xabs * 2 * yabs;
176
177 a = qrho < .085264;
178
179 if (a) {
180
181
182
183
184
185
186
187 qrho = (1 - y * (float).85) * sqrt(qrho);
188 d__1 = qrho * 72 + 6;
189 n = i_dnnt(&d__1);
190 j = (n << 1) + 1;
191 xsum = (float)1. / j;
192 ysum = 0.;
193 for (i__ = n; i__ >= 1; --i__) {
194 j += -2;
195 xaux = (xsum * xquad - ysum * yquad) / i__;
196 ysum = (xsum * yquad + ysum * xquad) / i__;
197 xsum = xaux + (float)1. / j;
198
199 }
200 u1 = (xsum * yabs + ysum * xabs) * -1.12837916709551257388 + (float)1.;
201 v1 = (xsum * xabs - ysum * yabs) * 1.12837916709551257388;
202 daux = exp(-xquad);
203 u2 = daux * cos(yquad);
204 v2 = -daux * sin(yquad);
205
206 *u = u1 * u2 - v1 * v2;
207 *v = u1 * v2 + v1 * u2;
208
209 } else {
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228 if (qrho > (float)1.) {
229 h__ = 0.;
230 kapn = 0;
231 qrho = sqrt(qrho);
232 nu = (integer)(1442 / (qrho * 26 + 77) + 3);
233 } else {
234 qrho = (1 - y) * sqrt(1 - qrho);
235 h__ = qrho * (float)1.88;
236 h2 = h__ * 2;
237 d__1 = qrho * 34 + 7;
238 kapn = i_dnnt(&d__1);
239 d__1 = qrho * 26 + 16;
240 nu = i_dnnt(&d__1);
241 }
242
243 b = h__ > (float)0.;
244
245 if (b) {
246 qlambda = pow_di(&h2, &kapn);
247 }
248
249 rx = (float)0.;
250 ry = (float)0.;
251 sx = (float)0.;
252 sy = (float)0.;
253
254 for (n = nu; n >= 0; --n) {
255 np1 = n + 1;
256 tx = yabs + h__ + np1 * rx;
257 ty = xabs - np1 * ry;
258
259 d__1 = tx;
260
261 d__2 = ty;
262 c__ = (float).5 / (d__1 * d__1 + d__2 * d__2);
263 rx = c__ * tx;
264 ry = c__ * ty;
265 if (b && n <= kapn) {
266 tx = qlambda + sx;
267 sx = rx * tx - ry * sy;
268 sy = ry * tx + rx * sy;
269 qlambda /= h2;
270 }
271
272 }
273
274 if (h__ == (float)0.) {
275 *u = rx * 1.12837916709551257388;
276 *v = ry * 1.12837916709551257388;
277 } else {
278 *u = sx * 1.12837916709551257388;
279 *v = sy * 1.12837916709551257388;
280 }
281
282 if (yabs == (float)0.) {
283
284 d__1 = xabs;
285 *u = exp(-(d__1 * d__1));
286 }
287 }
288
289
290
291 if (*yi < (float)0.) {
292
293 if (a) {
294 u2 *= 2;
295 v2 *= 2;
296 } else {
297 xquad = -xquad;
298
299
300
301
302 if (yquad > 3537118876014220. || xquad > 708.503061461606) {
303 goto L100;
304 }
305
306 w1 = exp(xquad) * 2;
307 u2 = w1 * cos(yquad);
308 v2 = -w1 * sin(yquad);
309 }
310
311 *u = u2 - *u;
312 *v = v2 - *v;
313 if (*xi > (float)0.) {
314 *v = -(*v);
315 }
316 } else {
317 if (*xi < (float)0.) {
318 *v = -(*v);
319 }
320 }
321
322 return 0;
323
324L100:
325 *flag__ = TRUE_;
326 return 0;
327
328}