https://bugs.documentfoundation.org/show_bug.cgi?id=166203
Bug ID: 166203
Summary: Rounding errors change for not-good reasons
Product: LibreOffice
Version: 25.2.0.0 alpha0+
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Calc
Assignee: [email protected]
Reporter: [email protected]
Created attachment 200357
--> https://bugs.documentfoundation.org/attachment.cgi?id=200357&action=edit
test.ods - demo spreadsheet
If positive & negative values are summed with the SUM(range) function the
results are sometimes inexact, but the behavior changes for reasons which don't
seem right:
* Inaccuracies seem to occur because empty cells are summed -- if an empty
cell is replaced with zero then the inaccuracy error goes away.
* If the cells are summed individually e.g. =A3+A4+...A30 instead of
=SUM(A3:A30), then the the inaccuracies disappear.
This implies that "+" and "SUM()" do not work exactly the same.
As a side note:
https://wiki.documentfoundation.org/Documentation/Calc_Functions/RAWSUBTRACT
kind of implies that LibreOffice by default tries to undo rounding errors
involving subtract, and presumably, addition of negative values. If that is a
correct inference, it isn't working in this case.
STEPS TO REPRODUCE:
1. Load the attached test.ods
Note the very small values rows 26 and 30 (e.g. -5.11590769747272E-13 where
zero is expected. When displaying currency values, a expected 0.00 value
appears in RED a -$0.00 because the real value is slightly negative.
Also look at cell F26 & F27 which has the formula
=A3+A4+A5+A6+A7+A8+A9+A10+A11+A12+A13+A14+A15+A16+A17+A18+A19+A20+A21+A22+A23+A24+A25+A26
It shows an exact zero even though the cells using =SUM($A$3:$A30) show
inaccurate results
2. Enter a zero into cell A11
Replacing the empty cell with zero makes the inaccuracies go away.
--
You are receiving this mail because:
You are the assignee for the bug.