Algorithm of Gaussian probability distribution function
http://groups.google.co.uk/groups?hl=en&lr=&ie=UTF-8&threadm=820cf52a.0402141539.67a25822%40posting.google.com
has lots of discussion and some C code for calculating the erf
function or the normal distribution cdf, the more usual name for the
gaussian distribution cdf, I think.
Most of the code works to a limited number of decimal places or are
approximations based on quadrature. Personally, I prefer algorithms
which can be made arbitrarily accurate even though they won't be as
quick (for an example see the "cnormal" function in
http://members.aol.com/iandjmsmith/myfunctions.js which is easy to
translate into C).
Ian Smith
|