[Rd] 0 ^ NaN == Inf, why?

Stephen Milborrow milbo at sonic.net
Sat Oct 25 16:59:53 CEST 2008


In R, 0 ^ NaN yields Inf.  I would have expected NaN or perhaps 0. Is this 
behaviour intended?

>sessionInfo()
R version 2.8.0 (2008-10-20)
i386-pc-mingw32

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United 
States.1252;LC_MONETARY=English_United 
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

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

Steve Milborrow
www.milbo.users.sonic.net



More information about the R-devel mailing list