[R] cube root of a negative number

Gregory Ryslik rsaber at comcast.net
Wed Oct 27 01:05:03 CEST 2010


Hi,

This might be me missing something painfully obvious but why does the cube root of the following produce an NaN?

> (-4)^(1/3)
[1] NaN
> 

As we can see:

> (-1.587401)^3
[1] -4

Thanks!

Greg


More information about the R-help mailing list