32 static const double a[] = { -3.969683028665376e1, 2.209460984245205e2,
33 -2.759285104469687e2, 1.383577518672690e2, -3.066479806614716e1,
35 static const double b[] = { -5.447609879822406e1, 1.615858368580409e2,
36 -1.556989798598866e2, 6.680131188771972e1, -1.328068155288572e1};
37 static const double c[] = { -7.784894002430293e-3, -3.223964580411365e-1,
38 -2.400758277161838, -2.549732539343734, 4.374664141464968,
40 static const double d[] = { 7.784695709041462e-3, 3.224671290700398e-1,
41 2.445134137142996, 3.754408661907416};
46 if (0.02425 <= x && x <= 0.97575)
50 y = (((((a[0]*r + a[1])*r + a[2])*r + a[3])*r + a[4])*r + a[5])*q
51 / (((((b[0]*r + b[1])*r + b[2])*r + b[3])*r + b[4])*r + 1);
55 double q = sqrt(-2.0 * log((x > 0.97575) ? (1.0 - x) : x));
56 y = (((((c[0]*q + c[1])*q + c[2])*q + c[3])*q + c[4])*q + c[5])
57 / ((((d[0]*q + d[1])*q + d[2])*q + d[3])*q + 1);
65 y -= u / (1.0 + 0.5 * y * u);