42 double c1, c2, zs, ny_fac, neg_ny_fac, zm, zp, pm, pp, term, sum, ze, za, mu, pa;
48 c1 = PI / 2.0 / sin(PI * NY);
52 ny_fac = NY * GAMMA_OF_NY;
53 neg_ny_fac = c2 / GAMMA_OF_NY;
54 e2 = pow(z / 2.0, NY);
55 zm = 1 / e2 / neg_ny_fac;
59 sum = term = c1 * (pm * zm - pp * zp);
61 while (fabs(term) > EPS1 * sum) {
63 pm = pm * zs / (k * (k - NY));
64 pp = pp * zs / (k * (k + NY));
65 term = c1 * (pm * zm - pp * zp);
69 ze = sqrt(PI / 2.0 / z) * exp(-z);
77 while (fabs(term) > EPS2 * sum) {
79 pa = pa * za * (mu - (2 * k - 1) * (2 * k - 1)) / k;