Issue 92515

Summary: Incorrect formula evaluation order
Product: Calc Reporter: tvenhola <tvenhola>
Component: codeAssignee: spreadsheet <spreadsheet>
Status: CLOSED DUPLICATE QA Contact: issues@sc <issues>
Severity: Trivial    
Priority: P3 CC: issues
Version: OOo 2.3   
Target Milestone: ---   
Hardware: PC   
OS: Linux, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Showcase of improper evaluation order none

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