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

John Chambers jmc at r-project.org
Sat Oct 25 21:55:21 CEST 2008


A small PS:

John Chambers wrote:
>
> Along the line, notice that both R_pow and pow give 0^0 as 1.  (Just at 
> a guess, C might give 0^-0 as Inf, but I don't know how to test that in R.)
>   
I tried a little harder, and apparently the guess is wrong.  It seems 
that pow(0, -0) is 1 in C.   Would seem better to either have pow(0,0) 
and pow(0,-0) both be NaN or else 1 and Inf, but ...
> John
>
>
>   
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>



More information about the R-devel mailing list