On 29/03/2011 5:33 PM, Patrizio Frederic wrote:
dear all,
here's a couple of questions that puzzled me in these last hours:
##### issue 1 qnorm(1-10e-100)!=qnorm(10e-100)
qnorm(1-1e-10) == -qnorm(1e-10)
# turns on to be FALSE. Ok I'm not a computer scientist but,
# but I had a look at the R inferno so I write:
all.equal(qnorm(1-1e-10) , -qnorm(1e-10))
# which turns TRUE, as one would expect, but
all.equal(qnorm(1-1e-100) , -qnorm(1e-100))
# turns FALSE: Indeed
# qnorm(1e-100) is -21.27345, and
# qnorm(1-1e-100) is Inf
Since
1 - 1e-100 == 1
is TRUE, but
1e-100 == 0
is FALSE, this is not a surprise.
Duncan Murdoch
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.