Re: OASIS: Infix Operator "^"



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.]

So, 2^3^4 = 2^(3^4) as I indicated in my previous post, too. [the formulas were correct]

2. The classic ERROR: -4^2
Mathematically, this yields always -(4^2)=-16, NEVER +16!!!
There is NO unary operator in mathematics that converts a number to its negative, like described in the documents.

This is utter nonsense. Of course there is such a unary operator. ...
NO, there is NO such unary operator: -x^2 = -x * -x = + x^2, THIS is NONSENSE. Such a unary operator does NOT exist. We can invent a new algebra with such an operator. It would simplify some things, we would never have to use -x^2, because it would evaluate to +x^2 anyway. But it would be utter nonsense.

Kind regards,

Leonard Mada



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