Zhiyuan Jason ZHENG wrote:
> Hello,
>
>
>
> I use R a lot, one thing bugs me is that when I try the following
>
>> x<- -8
>
>> x^(1/3)
>
> [1] NaN
>
>
>
> However, it is fine with -8^(1/3). Priority goes to the power. Can you help
> me out for this? Thanks.
Well,
mycuberoot <- functio
-help-boun...@r-project.org]
On Behalf Of Colin Millar
Sent: 17 November 2009 16:10
To: Zhiyuan Jason ZHENG; r-h...@stat.math.ethz.ch
Subject: Re: [R] Calculating the power of a negative number
Hi,
Look at
?NumericConstants
At the bottom of the details section you will find:
"Note t
this helps,
Colin.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Zhiyuan Jason ZHENG
Sent: 17 November 2009 14:00
To: r-h...@stat.math.ethz.ch
Subject: [R] Calculating the power of a negative number
Hello,
I use R a lot, one thi
Hello,
I use R a lot, one thing bugs me is that when I try the following
> x<- -8
> x^(1/3)
[1] NaN
However, it is fine with -8^(1/3). Priority goes to the power. Can you help
me out for this? Thanks.
Best,
Zhiyuan J. ZHENG
Ph.D. Candidate
Economic Department
Virginia Polyte
4 matches
Mail list logo