Bug 93983 - Calculation error with -x^y
Summary: Calculation error with -x^y
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 critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-07 09:24 UTC by donotspam
Modified: 2020-08-31 12:05 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description donotspam 2015-09-07 09:24:19 UTC
=-x^y is calculated as (-x)^y whereas it should be -(x^y)

Eg. -7^2 = -49 but is displayed as +49.

This may be the result intended by a user entering such a formula, but it is inaccurate - a calculator and Google both give the correct result of -49.

FYI gnumeric also displays +49 as the result but changes the formula in the background to =(-7)^2
Comment 1 MM 2015-09-07 18:16:11 UTC
Confirmed with v5.0.1.2 under mint 17.2 x64.
Confirmed with v3.3.4 under windows 7 x64.

No regression.
If you type in -(7^2) then the outcome is -49.
Comment 2 Julien Nabet 2015-09-07 19:56:06 UTC
I understand you but I let you read, if interested, the long debate about it on tdf#37271

*** This bug has been marked as a duplicate of bug 37271 ***
Comment 3 MM 2015-09-07 21:02:00 UTC
(In reply to Julien Nabet from comment #2)
> I understand you but I let you read, if interested, the long debate about it
> on tdf#37271
> 
> *** This bug has been marked as a duplicate of bug 37271 ***

Thanks for the reply. Maybe it *should* be set as an enhancement for a newer version of the ODF standard (1.3 ?) which handles this correctly. And let users know that they should use () when using this, in order to avoid further bugreports.
Comment 4 donotspam 2015-09-07 21:26:22 UTC
Please see my comment (13) at
https://bugs.documentfoundation.org/show_bug.cgi?id=37271#c13
Thanks