[R] exponent confusion

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Feb 22 17:51:54 CET 2006


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




More information about the R-help mailing list