[R] (-8)^(1/3) == NaN?
Victor Manuel Garcia Guerrero
vmgarcia at colmex.mx
Sun Jul 19 19:12:38 CEST 2009
It' true, but if you type -8^(1/3) returns -2, and if you type -8^1/3 it returns -2.66666, maybe there are some rules about parenthesis...
regards
Víctor
________________________________
De: r-help-bounces at r-project.org en nombre de Dave DeBarr
Enviado el: sáb 18/07/2009 05:04
Para: r-help at r-project.org
Asunto: [R] (-8)^(1/3) == NaN?
Why does the expression "(-8)^(1/3)" return NaN, instead of -2?
This is not answered by http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-powers-of-negative-numbers-wrong_003f
Thanks,
Dave
[[alternative HTML version deleted]]
______________________________________________
R-help at 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.
More information about the R-help
mailing list