Bug 142451 - wrong result for minus the square of a number
Summary: wrong result for minus the square of a number
Status: RESOLVED DUPLICATE of bug 74525
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-23 18:41 UTC by Fernando
Modified: 2021-05-24 07:51 UTC (History)
0 users

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 Fernando 2021-05-23 18:41:54 UTC
Calc gives a wrong result for an expression like "=-A1^2". It should square the number in cell A1 and then return a negative result (if the A1 content is 2, the result should be -4). But instead it returns a positive result.
Comment 1 laurent combe 2021-05-24 05:33:59 UTC
i confirm this issue.
(if the A1 content is 2)

=0-A1^2 returns -4
=-A1^2+0 returns 4

my LOO version:

Version: 7.1.3.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Ubuntu package version: 1:7.1.3~rc2-0ubuntu0.18.04.1~lo1
Calc: threaded
Comment 2 laurent combe 2021-05-24 06:24:52 UTC
i can reproduce the issue with version 3.3.0.4 found in
https://downloadarchive.documentfoundation.org/libreoffice/old/
Comment 3 Timur 2021-05-24 07:51:12 UTC
Reported already but closed as NotABug.

*** This bug has been marked as a duplicate of bug 74525 ***