Abstract:
We provide computer codes in ANSI-C and Python for a fast and accurate computation of the cumulative distribution function (cdf) of the standard normal distribution and the inverse cdf of the same function. For the cdf we use the 5th order Gauss-Legendre quadrature which gives more accurate results compared to Excel and Matlab. The Inverse cdf is computed using rational fraction approximations and gives a result that is seven-decimal place accurate.
Keywords:C/C++; Gauss-Legendre; Quadarture; Normal; distribution; Numerical; Integration; Rational; fraction; approximations; Software (search for similar items in EconPapers) JEL-codes:C63C88C89 (search for similar items in EconPapers) New Economics Papers: this item is included in nep-ecm and nep-rmg Date: 2002-12-27, Revised 2003-03-07 Note: Type of Document - ; pages: 13 ; figures: included. cdf.c : Is ANSI-C code to compute the cdf of standard normal dist. using a composite fifth-order Gauss-Legendre quadrature cdf-GL.py : same as cdf.c except the code is written in Python cdf.py : Python code to compute the cdf using rational fraction approximations invcdf.py : Python code to compute the inverse cdf using rational fraction approximations. ftp://wueconb.wustl.edu/econ-wp/prog/papers/0212/0212001.zip View list of references