Lines Matching defs:erf
39 static char sccsid[] = "@(#)erf.c 8.1 (Berkeley) 6/4/93";
58 /* double erf(double x)
62 * erf(x) = --------- | exp(-t*t)dt
66 * erfc(x) = 1-erf(x)
69 * 1. Reduce x to |x| by erf(-x) = -erf(x)
71 * erf(x) = x + x*P(x^2)
72 * erfc(x) = 1 - erf(x) if x<=0.25
77 * is an approximation to (erf(x)-x)/x with precision
80 * | P - (erf(x)-x)/x | <= 2
84 * erf(x) = (2/sqrt(pi))*(x - x^3/3 + x^5/10 - x^7/42 + ....)
88 * point of erf(x) is near 0.6174 (i.e., erf(x)=x when x is
90 * guarantee the error is less than one ulp for erf.
94 * erf(x) = c + P1(s)/Q1(s)
96 * |P1/Q1 - (erf(x)-c)| <= 2**-59.06
98 * erf(1+s) = erf(1) + s*Poly(s)
101 * erf(1+s) - (c = (single)0.84506291151)
108 * erf(x) = 1.0 - tiny
114 * erf(x) = 1.0 - tiny
141 * erf(x) = 1 - tiny (raise inexact)
145 * erf(0) = 0, erf(inf) = 1, erf(-inf) = -1,
147 * erfc/erf(NaN) is NaN
174 * Coefficients for approximation to erf in [0,0.84375]
189 * Coefficients for approximation to erf in [0.84375,1.25]
269 extern double erf(x)
273 if(!finite(x)) { /* erf(nan)=nan */
276 return (x > 0 ? one : -one); /* erf(+/-inf)= +/-1 */