To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=75620
                 Issue #|75620
                 Summary|Order of Operations Error
               Component|Spreadsheet
                 Version|OOo 2.0.4
                Platform|PC
                     URL|
              OS/Version|Linux
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|programming
             Assigned to|spreadsheet
             Reported by|mikkl





------- Additional comments from [EMAIL PROTECTED] Thu Mar 22 00:48:42 +0000 
2007 -------
The order of mathematical operations is incorrectly implemented in calc.  The
sequence should be Parenthesis, Exponents, Multiplication & Division, Addition &
Subtraction, all taken left to right.  By this order, -x^2 and -(x^2) are
equivalent expressions.  If x = -1, both terms should evaluate to -1.  In Calc,
the first term evaluates as 1 and the second term evaluates to -1.  The
fundamental error in this implementation is evident with the equation "-x^2 +
42".  By the commutative property of addition and subtraction "42 - x^2" and
"-x^2 + 42" should give the same results.  In calc, they do not.  In order to
assure the correct answer, the equation must be written as -(x^2) + 42.  These
additional parenthesis should not be required.

I would note that this incorrect handling of the order of operations is
consistent with Microsoft Excel--this is /not/ a product benefit (though it may
be appropriate to make this inaccurate behavior a switch for compatibility
reasons).  The implication of this error is that subtle mathematical errors will
propagate through complex worksheets unless the user/programmer takes great care
to heavily use parenthesis throughout all of their calculations.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to