Bug 150855 - Wrong calculations if used no brackets
Summary: Wrong calculations if used no brackets
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-08 07:58 UTC by janeku
Modified: 2022-09-08 10:53 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
test file for reported bug (10.42 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-09-08 07:59 UTC, janeku
Details

Note You need to log in before you can comment on or make changes to this bug.
Description janeku 2022-09-08 07:58:24 UTC
Description:
If you make adding from few cells and nusing no brackets you get wrong result.

Steps to Reproduce:
1.Insert value in cell A1 (ex. 2500)
2.Insert Value B1 (ex.2500)
3.Insert value D1 (ex.10000)
4.In cell C1 insert formula: =D1-A1+B1

Actual Results:
10000

Expected Results:
5000


Reproducible: Always


User Profile Reset: Yes



Additional Info:
If you put in brackets =D1-(A1+B1) result is correct.

Version: 7.3.6.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.6~rc2-0ubuntu0.20.04.1~lo1
Calc: threaded
Comment 1 janeku 2022-09-08 07:59:34 UTC
Created attachment 182300 [details]
test file for reported bug
Comment 2 m_a_riosv 2022-09-08 10:53:43 UTC
Sorry, but it is not the same, the brackets give precedence to the calculations in them.

=10000-2500+2500 = 10000
=10000-(2500+2500) = 10000 - 5000 = 5000

So in both cases the result it's correct.