From ggrothendieck at gmail.com  Fri Jan  6 16:33:05 2006
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Fri, 6 Jan 2006 10:33:05 -0500
Subject: [Rd] Multiplication (PR#8466)
In-Reply-To: <Pine.LNX.4.64.0601060712540.7293@homer24.u.washington.edu>
References: <20060106144345.5682219AC0@slim.kubism.ku.dk>
	<Pine.LNX.4.64.0601060712540.7293@homer24.u.washington.edu>
Message-ID: <971536df0601060733y432c989avf033983bd5ffeae3@mail.gmail.com>

On 1/6/06, Thomas Lumley <tlumley at u.washington.edu> wrote:
> On Fri, 6 Jan 2006, casella at stat.ufl.edu wrote:
>
> > hi - in version 2.1 the command
> >
> > >-2^2
> >
> > gives
> >
> > -4
> >
> > as the answer.  (-2)^2 is evaluated correctly.
>
> So is -2^2.  The precedence of ^ is higher than that of unary minus. It
> may be surprising, but it *is* documented and has been in S for a long
> time.

See ?Syntax



[Rd] Multiplication (PR#8466)
Gabor Grothendieck