efficient and accurate approximation of error function I am looking for the numerical approximation of error function, which must be efficient and accurate. Thanks in advance
$$\mathrm{erf}(z)=\frac2{\sqrt\pi}\int_0^z  e^{-t^2} \,\mathrm dt$$
 A: "Efficient and accurate" is probably contradictory... Have you tried the one listed in http://en.wikipedia.org/wiki/Error_function#Approximation_with_elementary_functions ?
A: How about this: Computation of the error function erf in arbitrary precision with correct rounding
A: I know its an old post, but others stumbling upon this post might find it helpful. You can try the accurate approximate analytical expression for faster numerical evaluation such as this or answers in this post especially by Ron Gordon. 
A: It can be computed by using the complex error function (aka the Faddeeva function):
$$1-{\rm{erf}}(z)=e^{-z^2}w(iz)$$
Matlab and C packages for the Faddeeva function are available in the Matlab Central.
A: In terms of approximation, I think that using
$$\text{erf}(x) \sim \sqrt{1-\exp\Big[
-\frac {4x^2} {\pi} P_{n}(x) \Big]}$$ where $P_n$ is the $[2n,2n]$ Padé approximant built around $x=0$ can be very good. For example
$$P_1(x)=\frac {1+\frac{\left(10-\pi ^2\right) }{5 (\pi -3) \pi }x^2 } {1+\frac{\left(120-60 \pi +7 \pi ^2\right) }{15 (\pi -3) \pi }x^2 }$$ Computing
$$\Phi_n=\int_0^\infty \left(\text{erf}(x)-\sqrt{1-\exp\Big[
-\frac {4x^2} {\pi} P_{n}(x) \Big]}\right) ^2\,dx$$ gives $\Phi_0=3.23\times 10^{-5}$,  $\Phi_1=3.04\times 10^{-8}$, $\Phi_2=1.20\times 10^{-10}$, $\Phi_3=3.97\times 10^{-12}$.
