From efreeman at berkeley.edu  Thu May 13 22:04:50 2010
From: efreeman at berkeley.edu (efreeman at berkeley.edu)
Date: Thu, 13 May 2010 13:04:50 -0700
Subject: [Rd] results of pnorm as either NaN or Inf
Message-ID: <c53bc16d255966cc62b8b7d085027628@berkeley.edu>

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



[Rd] results of pnorm as either NaN or Inf
efreeman at berkeley.edu