On 27.05.2013 13:33, Norbert Thiebaud wrote:
On Mon, May 27, 2013 at 4:20 AM, Torokhov Sergey <torokhov-...@yandex.ru> wrote:
There is a some strange behaviour in "OpenOffice Calc" (and in Microsoft Office 
too). Did it was made in OpenOIffice for compability with MSO?
http://en.wikipedia.org/wiki/Order_of_operations#Exceptions_to_the_standard

The behavior or OpenOffice and MSO and C in general in computing, is
due to the way 'parsing' works,

I don't think so. First you define what the precedence of your operators should be and only then you define your grammar to parse expressions accordingly. I think that these two reasons are more probably:

1. An error in the original implementation (of MS Office)

2. Maybe -1^2 = 1 is what the majority of (non-mathematical) users of MS Office expect.

In any case, this is a problem with no good solution.

-Andre

  which in computing _must_ be
un-ambiguous.
There is a 'gramatical distinction between '- the binary operator as
in  a - b , which is  (operator -)(a,b) and the unary operator - as in
-a.

The later is treated with a higher priority so that expression like a
* -b can be parsed properly. (other wise it would be treated as a * (0
implicit) - b => -b instead of -ab

Norbert

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org

Reply via email to