Bug 125183 - Rounding Error in Formula Addition
Summary: Rounding Error in Formula Addition
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-09 01:33 UTC by kitchm
Modified: 2020-03-16 02:37 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
calc test (10.02 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-05-09 16:32 UTC, Oliver Brinzing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kitchm 2019-05-09 01:33:55 UTC
Description:
Adding the results of three calculations in a formula fails to give same results if done manually.  See example sheet.

$62 divided by 3 divided by 5 = $4.13
$240 divided by 36 divided by 5 = $1.33
$300 divided by 12 divided by 5 = $5.00
Sum is 10.46
Times 2 Total is $20.92

Spreadsheet says 
$20.94

(Calc is set to round to two decimal points.)

Steps to Reproduce:
1.See sample sheet.
2.
3.

Actual Results:
Wrong

Expected Results:
Correct


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Oliver Brinzing 2019-05-09 16:32:23 UTC
Created attachment 151274 [details]
calc test
Comment 2 Oliver Brinzing 2019-05-09 16:37:40 UTC
setting the cell format to two decimal places does not mean that
only two decimal places are expected.

you have to use a formula, e.g. round():
https://help.libreoffice.org/6.3/en-US/text/scalc/01/04060106.html?System=WIN&DbPAR=CALC&HID=SC_HID_FUNC_RUNDEN#bm_id3158133

please have a look at the attachment
Comment 3 kitchm 2019-05-10 19:09:20 UTC
Sorry, but you've made a mistake.  By using your own sheet, you've failed to make mine work or show how it could.  It does not by adding ROUND to the beginning of the formula as you suggest.
Comment 4 Oliver Brinzing 2019-05-11 13:17:25 UTC
Please attach a sample document, as this makes it easier for us to verify the bug. 
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Comment 5 kitchm 2019-05-12 14:09:56 UTC
What is going on here?  You can see that I already had.
Comment 6 QA Administrators 2019-05-14 03:03:28 UTC Comment hidden (obsolete)
Comment 7 Buovjaga 2019-08-17 15:15:45 UTC
(In reply to kitchm from comment #5)
> What is going on here?  You can see that I already had.

No, we can't see an attachment from you. Please add it.

Please attach an example document.
Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the document.
Comment 8 QA Administrators 2020-02-14 02:31:48 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2020-03-16 02:37:04 UTC
Dear kitchm,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp