Approximation of a normal distribution function I am reviewing and documenting a software application (part of a supply chain system) which implements an approximation of a normal distribution function; the original documentation mentions the same/similar formula quoted here
$$\phi(x) = {1\over \sqrt{2\pi}}\int_{-\infty}^x e^{-{1\over 2} x^2} \ dx$$
This is approximated with what looks like an asymptotic series like here
however the expression is slightly different:
$$\phi(x) \simeq {1\over x\sqrt{2\pi}} \Bigl( 1 - {1\over x^2} + {3\over x^4} - {15\over x^6} + {105 \over x^8}\Bigr)$$
The original document quotes a "Cambridge statistical tables" book which I don't have; also, the software uses a precalculated table for values of $x$ between $[-8.2, 8.2]$ and uses the approximation function for values of $x$ outside that interval.
I need to find some reference that explains why this particular formula was chosen, and how accurate the approximation really is.
(The documentation claims that an error less then the $7$th decimal is "not bad")
Also, the constant $1/\sqrt{2\pi}$ does it have a name? All I was able to find was that "this expression ensures that the total area under the curve $\Phi(x)$ is equal to one"
Does it matter if the constant has only $10$ decimals when the double type in Java (IEEE 754) has a precision of approximately $16$ decimals?
 A: This is the (divergent) asymptotic development for $
f(x)=\int_x^{\infty} e^{-{1\over 2}t^2} \ dt
$ given by
$$f(x) \sim
e^{-{x^2\over 2}}\ (\ {1\over x}\  + \
\Sigma_{k=1}^{\infty}\ {(-1)^k(2k-1)!\over 2^{k-1}(k-1)!}\ {1\over x^{2k+1}}\ )
$$
or
$$f(x) \sim
e^{-{x^2\over 2}}\ (\ {1\over x}\  - {1\over x^3} + {3\over x^5} - {15\over x^7} + {105\over x^9} - {945\over x^{11}}...)$$
It is easily obtained from an integration by parts. The remainder is given by an explicit integral. From its expression, one can check that $f(x)$ is in fact squeezed between two consecutive sums of the series. As a result, we have the bound, for all $x>0$,
$$0 \geq f(x) -
e^{-{x^2\over 2}}\ (\ {1\over x}\  - {1\over x^3} + {3\over x^5} - {15\over x^7} + {105\over x^9}) \geq - e^{-{x^2\over 2}}\ {945\over x^{11}}$$
Divergent series were standard tools at the beginning of the XXe century. I can't provide a reference, but the book of Hardy "Divergent series" may be a starting point for a bibliographic search.
The divergent asymptotics was chosen because it is "good" at infinity. When truncated to some power (say 9), it has the correct behavior when $x$ goes to infinity, that is, it goes to zero, just like $f(x)$. So it gives an interesting approximation of $f$ for all sufficiently big value of $x$. This of course is not the case of a development obtained by truncating a converging series in positive powers of $x$.
A: The source code of R (http://cran.r-project.org/mirrors.html ) contains implementation (in C) of various distributions, and among them, of a normal one (see, for example, the file src/nmath/pnorm.c in the source tree of the latest version 2.10.1). The approximation they are using seems to be different (and more precise) than yours, but there are references in comments. Probably you may get a hint by looking there.
A: For the normal CDF:
$$
\Phi(x) \approx \frac{1}{1+e^{-1.65451*x}}
$$
worked very well for me.
