Bug 123408 - the sum of this selection is wrong, an offset of 1/100.
Summary: the sum of this selection is wrong, an offset of 1/100.
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2 all versions
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 129220 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-02-12 15:29 UTC by pierre klein
Modified: 2019-12-06 03:10 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
this is a copy a of the screen, problem highlited in yellow (37.94 KB, image/jpeg)
2019-02-12 15:33 UTC, pierre klein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pierre klein 2019-02-12 15:29:31 UTC
Description:
hello, i m french, sorry for my english...
for those numbers, and just for those one, 
-474
-56,86
10,59
40,86
51,29
129,57
30,35
41,56
22,89
167,47
if you SELECT all of those, you will get 36.2799999999... no reason. the good one is just -36.28.
with Version: 5.2.7.2
Build ID: 2b7f1e640c46ceb28adf43ee075a6e8b8439ed10
Threads CPU : 8; Version de l'OS :Windows 6.1; UI Render : par défaut; 
Locale : fr-FR (fr_FR); Calc: group

Steps to Reproduce:
1.WRITE THE GIVED NUMBERS, one under the other one
2.select all togheter
3.see the difference between the sum and the selection.

Actual Results:
exactly the same, -36.2799999...

Expected Results:
-36.28


Reproducible: Always


User Profile Reset: No



Additional Info:
you can email me if you do not understand what i try to explain...
Comment 1 pierre klein 2019-02-12 15:33:20 UTC
Created attachment 149227 [details]
this is a copy a of the screen, problem highlited in yellow

this is a copy a of the screen, problem highlited in yellow
Comment 2 Eike Rathke 2019-02-12 15:59:02 UTC
That is due to loss of precision when using the IEEE 754 floating point format. All computer software not using binary coded decimals or other means to correct precision round-offs suffers from it. See
http://0.30000000000000004.com/
https://en.wikipedia.org/wiki/Numeric_precision_in_Microsoft_Excel
https://www.microsoft.com/en-us/microsoft-365/blog/2008/04/10/understanding-floating-point-precision-aka-why-does-excel-give-me-seemingly-wrong-answers/

If you format the cells involved to two decimals, for example 0.00 then that format will be used in the status bar as well and the result displayed accordingly rounded.
Comment 3 Oliver Brinzing 2019-02-12 17:42:27 UTC
(In reply to Eike Rathke from comment #2)
> That is due to loss of precision when using the IEEE 754 floating point format. 

IMHO we can set this issue to RESOLVED/NOTABUG
Comment 4 m_a_riosv 2019-12-06 03:10:08 UTC
*** Bug 129220 has been marked as a duplicate of this bug. ***