https://bugs.freedesktop.org/show_bug.cgi?id=63694
Priority: medium
Bug ID: 63694
Assignee: [email protected]
Summary: : SUM() ignores small numbers
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: [email protected]
Hardware: Other
Whiteboard: BSA
Status: UNCONFIRMED
Version: 3.5.7.2 release
Component: Spreadsheet
Product: LibreOffice
Problem description:
The SUM() function in libreoffice calc treats small numbers (small enough to be
displayed in exponential notation) as zero.
Steps to reproduce:
In cell A1, enter: -4.0E-4
In cell A2, enter: 0.01
In cell A3: =SUM(A1:A2)
In cell A4: =A1+A2
In A4, you will see the correct result, but in cell A3, you'll just see a copy
of the result in cell A2. Sum should parse numbers in the same way as other
equivalent arithmetic operations.
My understanding is that libreoffice, based on java, is supposed to follow the
IEEE 754 standard.
Scala and python, on the same standard, properly parse the -4E-4 number:
scala> -4.0E-4 + 0.01
res61: Double = 0.009600000000000001
>>> -4.0E-4 + 0.01
0.009600000000000001
If I use the SUM() function in excel it also gives me the correct result.
Current behavior:
The exponential value is ignored, in cell A3 we see the value in cell A2.
Expected behavior:
A3 should contain the value 0.0096, as in A4.
Operating System: Ubuntu
Version: 3.5.7.2 release
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs