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



Hi Leonard,

First, please note that this discussion is highly unproductive because
cross posted to multiple mailing lists, gnumeric-list gnome org and
office-comment lists oasis-open org, and answers don't show up on the
office-comment list as Gnumeric people aren't subscribed there, same as
my answer probably won't show up on gnumeric-list if not moderated
through.

On Thursday, 2007-02-22 23:34:02 +0200, Leonard Mada wrote:

Andreas J Guelzow wrote:
Unfortunately there is a
significant discrepancy of the normal mathematical definitions and what
is used in spreadsheets.
 

However, there is NO discrepancy what mathematicians use. Also, 
dedicated mathematical programs are fairly consistent with these 
precedence rules. I therefore recommend to every developer of a 
mathematical standard to have first a look at Mathematica.
[Of course there is an issue here: in OOo ^ appears to be
left-associative while in Gnumeric it is right-associative.]
 
1. “^” is left-associative, not right-associative!!!
   

Wherever I look I find that ^ is indeed right-associative contrary to
your claim. ...

I meant right-associative! [The former was actually the definition 
inside the OASIS document.]

Well, you should have stated so and/or somehow marked it as a quote.
Adding multiple exclamation marks actually made no one believe that it
could be a quote of the OASIS draft, I think.

The ^-operator is problematic, being defined left-associative and the
special case of when a formula starts with a =-x^y expression it is
interpreted as if it was =0-x^y date back to Excel practice and maybe
even Lotus 1-2-3 or others. The =-x^y behavior is needed for
interoperability.

You may argue back and forth that it's mathematically wrong and
I wholeheartedly agree, but being mathematically correct doesn't help us
here in the latter case.

To prevent users from shooting themselves into their feet applications
may implement UI means like Gnumeric did with the automatic conversion
to =(-x)^y, which is nice. For the file format however formulas may have
been converted between different appplication's formats and fiddling
around with a formula isn't always feasible.

Whether we really should define the operator being left-associative is
arguable though. I tend to disagree with the current draft, even if
that's what OOo (following Excel) currently implements, and will discuss
further on the OASIS formula subcommittee's list.

  Eike

-- 
 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]