Re: [R] exponent confusion

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Thu 23 Feb 2006 - 03:51:54 EST

On Wed, 22 Feb 2006, tom wright wrote:

> please excuse me if this ones a basic error
>
>> y<-c(-0.7,-0.6,-0.5)
>> -0.7^1.22
> [1] -0.6471718

?Syntax shows ^ has a higher precedance than -, so that is

-(0.7^1.22)

>
>> y^1.22
> [1] NaN NaN NaN
>
> am I missing something important in my basic math?

>
> ______________________________________________
> 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
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
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 Thu Feb 23 04:07:22 2006

This archive was generated by hypermail 2.1.8 : Thu 23 Feb 2006 - 06:23:11 EST