Bug 94568 - Wrong interpretation of mathematics formulas
Summary: Wrong interpretation of mathematics formulas
Status: RESOLVED DUPLICATE of bug 37271
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 50596 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-09-28 11:28 UTC by Adrian Maire
Modified: 2020-08-31 12:05 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Maire 2015-09-28 11:28:25 UTC
The operator preference between sign (-/+) and power (^) is incorrect. The pow operator shall have higher preference than the sign operator:

Scenario example:

=-7^2

The result is -7*7 = -49

The shown result is (-7)*(-7) = 49, which is wrong.

Note: If you compare with excel, it has also this issue. Other software like Wolframalpha manage it correctly.
Comment 1 Eike Rathke 2015-09-28 11:46:38 UTC

*** This bug has been marked as a duplicate of bug 44076 ***
Comment 2 Eike Rathke 2015-09-28 11:55:37 UTC
Bah, sorry, it's not a duplicate of that one.. but I'm almost sure we have that already somewhere, if not then from old OOo times.

Maybe we could change input of =-x^y to =(-x)^y to clarify that this is what will be calculated.
Comment 3 Cor Nouws 2015-09-28 12:42:45 UTC
(In reply to Adrian Maire from comment #0)

> Note: If you compare with excel, it has also this issue. 
> Other software like Wolframalpha manage it correctly.

Always good for interesting discussions ;)
Comment 4 GerardF 2015-09-28 17:01:24 UTC
(In reply to Eike Rathke from comment #2)
> Bah, sorry, it's not a duplicate of that one.. but I'm almost sure we have
> that already somewhere, if not then from old OOo times.
> 
> Maybe we could change input of =-x^y to =(-x)^y to clarify that this is what
> will be calculated.

Dup of tjis one ; https://bugs.documentfoundation.org/show_bug.cgi?id=37271

*** This bug has been marked as a duplicate of bug 37271 ***
Comment 5 mwelinder 2018-11-13 19:25:52 UTC
*** Bug 50596 has been marked as a duplicate of this bug. ***