Re: [office-formula] Re: OASIS: Infix Operator "^"

From
Andreas J. Guelzow <>
Date
2007-02-23T21:30:37+00:00
ID
Thread
Re: [office-formula] Re: OASIS: Infix Operator "^"
On Fri, 2007-23-02 at 22:11 +0100, Eike Rathke wrote:
> On Thursday, 2007-02-22 14:33:32 -0700, Andreas J Guelzow wrote:
> 
> David:
> > > Spreadsheet applications generally agree that "=-2^2" computes as 4,
> > > and that "=2^3^4" is 4096.  Certainly both OpenOffice.org and Excel
> > > agree on that, and if I recall correctly, many other spreadsheet
> > > applications do as well.
> > 
> > I would like to point out that Gnumeric does calculate =2^3^4 as
> > 2.41785163922926E+24. So "generally agree" is not quite correct.
> 
> Seconded. I also tend to disagree with the current draft for the
> definition of ^ being left-associative. The case of =-x^y being handled
> as =(-x)^y is common agreement it seems, but left-association is
> arguable, I think. OOo currently follows Excel there, others do
> different.
> 
> I'm a bit undecided though, and it's not clear what impact a definition
> of right-associative would have. I don't know to what extend 2^3^4 and
> expecting left-association is used in the wild.

Personally I would prefer if we required parentheses. And then the
interface can do what it wants.

Andreas

-- 
Andreas J. Guelzow, Professor
Dept. of Mathematical & Computing Sciences
Concordia University College of Alberta