Issue 92515 - Incorrect formula evaluation order
Summary: Incorrect formula evaluation order
Status: CLOSED DUPLICATE of issue 26755
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 2.3
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: spreadsheet
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-06 11:50 UTC by tvenhola
Modified: 2008-08-06 14:30 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Showcase of improper evaluation order (8.63 KB, application/vnd.oasis.opendocument.spreadsheet)
2008-08-06 11:51 UTC, tvenhola
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description tvenhola 2008-08-06 11:50:35 UTC
Bug in handling formulas that start with minus sign and use exponent:
Examples of mishandled equations:
-(5+3)^2
exp(-(5+3)^2)

However these seem to work properly
0-(5+3)^2
-((5+3)^2)
Comment 1 tvenhola 2008-08-06 11:51:27 UTC
Created attachment 55595 [details]
Showcase of improper evaluation order
Comment 2 frank 2008-08-06 14:29:43 UTC
duplicate to Issue 26755

IMHO it should be more like 24405.

Your examples states that the brackets have to be done first, so you get 8 ,
this is made negative because nothing is placed in front of the minus sign and
than the square follows on minus 8 which is per definition 64 as (-8)*(-8)=64

If you place a zero in front of the minus sign you have a complete different
operation and Calc calculates it correctly as it do for the other example.

However this one is closed duplicate.

Frank

*** This issue has been marked as a duplicate of 26755 ***
Comment 3 frank 2008-08-06 14:30:47 UTC
closed double