[Rd] results of pnorm as either NaN or Inf

efreeman at berkeley.edu efreeman at berkeley.edu
Thu May 13 22:04:50 CEST 2010


I stumbled across this and I am wondering if this is unexpected behavior
or if I am missing something.

> pnorm(-1.0e+307, log.p=TRUE)
[1] -Inf
> pnorm(-1.0e+308, log.p=TRUE)
[1] NaN
Warning message:
In pnorm(q, mean, sd, lower.tail, log.p) : NaNs produced
> pnorm(-1.0e+309, log.p=TRUE)
[1] -Inf

I don't know C and am not that skilled with R, so it would be hard for me
to look into the code for pnorm. If I'm not just missing something, I
thought it may be of interest.

Details:
I am using Mac OS X 10.5.8. I installed a precompiled binary version. Here
is the output from sessionInfo(), requested in the posting guide:
R version 2.11.0 (2010-04-22) 
i386-apple-darwin9.8.0 

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_2.11.0

Thank you very much,

Eric Freeman
UC Berkeley



More information about the R-devel mailing list