Evaluating the Normal Distribution

George Marsaglia

Main Article Content

Abstract

This article provides a little table-free C function that evaluates the normal distribution with absolute error less than 8 x 10 -16 . A small extension provides relative error near the limit available in double precision: 14 to 16 digits, the limits determined mainly by the computer's ability to evaluate exp(-t) for large t. Results are compared with those provided by calls to erf or erfc functions, the best of which compare favorably, others do not, and all appear to be much more complicated than need be to get either absolute accuracy less than 10-15 or relative accuracy to the exp()-limited 14 to 16 digits. Also provided: A short history of the error function erf and its intended use, as well as, in the "browse files" attachment, various erf or erfc versions used for comparison.

Article Details

Article Sidebar