Re: [R] R: to the power

From: Bernardo Rangel Tura <tura_at_centroin.com.br>
Date: Sat 16 Jul 2005 - 19:09:40 EST

At 10:11 12/7/2005, allan_sta_staff_sci_main_uct@mail.uct.ac.za wrote:

>hi all
>
>why does R do this:
>
>(-8)^(1/3)=NaN
>
>the answer should be : -2

Allan

In my computer:
 > (-8)^(1/3)
[1] NaN

 > -8^(1/3)
[1] -2

 > -(8^(1/3))
[1] -2

The problem is -8 or the problem is (-8) ?

[]s
Tura

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Sat Jul 16 19:07:37 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:46 EST