In the R source, nmath/pnorm.c contains the
code for a rational function approximation
for the normal cdf. These constants are listed:
const double a[5] = {
2.2352520354606839287,
161.02823106855587881,
1067.6894854603709582,
18154.981253343561249,
0.065682337918207449113
};
The source file cites a paper by Cody (1969)
and states that these constants are derived from
Cody's paper. I've checked the paper, and
the constants do not agree, so I assume someone
else derived slightly different constants. The source
also contains a reference to 1993 paper by Cody,
but this paper describes software itself, not the
derivation of the approximation used.
Does anyone know of another reference for these
and other constants used in pnorm.c? Is there a
general reference detailing how to derive such
approximations?
Thank-you,
Jason
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
rational approximations to the normal cdf
2 messages · Jason H. Stover, Peter Dalgaard
"Jason H. Stover" <jstover at gcsu.edu> writes:
In the R source, nmath/pnorm.c contains the
code for a rational function approximation
for the normal cdf. These constants are listed:
const double a[5] = {
2.2352520354606839287,
161.02823106855587881,
1067.6894854603709582,
18154.981253343561249,
0.065682337918207449113
};
The source file cites a paper by Cody (1969)
and states that these constants are derived from
Cody's paper. I've checked the paper, and
the constants do not agree, so I assume someone
else derived slightly different constants. The source
also contains a reference to 1993 paper by Cody,
but this paper describes software itself, not the
derivation of the approximation used.
Does anyone know of another reference for these
and other constants used in pnorm.c? Is there a
general reference detailing how to derive such
approximations?
Thank-you,
Jason
pnorm.c is based on ANORM from http://www.netlib.org/toms/715, which has the same constants and is by Cody himself. The exacts words there are: C The main computation evaluates near-minimax approximations C derived from those in "Rational Chebyshev approximations for C the error function" by W. J. Cody, Math. Comp., 1969, 631-637. Notice "derived from". My guess would be that he applied the same methods but to give optimal approximations over different intervals from the 1969 paper.
O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._