Lines Matching full:erf
40 // Coefficients for approximation to erf on [00.84375]
56 // Coefficients for approximation to erf in [0.843751.25]
108 _CLC_OVERLOAD _CLC_DEF float erf(float x) {
168 _CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, float, erf, float);
185 /* double erf(double x)
189 * erf(x) = --------- | exp(-t*t)dt
193 * erfc(x) = 1-erf(x)
195 * erf(-x) = -erf(x)
200 * erf(x) = x + x*R(x^2)
201 * erfc(x) = 1 - erf(x) if x in [-.84375,0.25]
206 * | R - (erf(x)-x)/x | <= 2
210 * erf(x) = (2/sqrt(pi))*(x - x^3/3 + x^5/10 - x^7/42 + ....)
214 * point of erf(x) is near 0.6174 (i.e., erf(x)=x when x is
216 * guarantee the error is less than one ulp for erf.
220 * erf(x) = sign(x) * (c + P1(s)/Q1(s))
223 * |P1/Q1 - (erf(|x|)-c)| <= 2**-59.06
225 * erf(1+s) = erf(1) + s*Poly(s)
228 * erf(1+s) - (c = (single)0.84506291151)
236 * erf(x) = 1 - erfc(x)
245 * erf(x) = sign(x)*(1.0 - erfc(x)) if x < 6, else
246 * erf(x) = sign(x)*(1.0 - tiny)
269 * erf(x) = sign(x) *(1 - tiny) (raise inexact)
274 * erf(0) = 0, erf(inf) = 1, erf(-inf) = -1,
276 * erfc/erf(NaN) is NaN
340 _CLC_OVERLOAD _CLC_DEF double erf(double y) {
399 _CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, erf, double);
405 _CLC_OVERLOAD _CLC_DEF half erf(half h) {
406 return (half)erf((float)h);
409 _CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, half, erf, half);