[Semibug] LibreOffice is summing incorrectly

admin at bclug.ca admin at bclug.ca
Sat May 18 21:52:11 EDT 2024


Jonathan Drews wrote on 2024-05-18 17:44:

> I got a big problem. If I sum the column of numbers in LibreOffice Iget
> 43.81000
> 0.00000
> 95.53000
> 21.90000
> 18.90000
> 37.72000
> 174.89000
> 16.73000
> 0.00000
> 18.56000
> 0.00000
> 
> 423.02067
> 
> or rounded to two places 423.02

I get $428.04



> But if I add them up using dc then I get the correct answer:
> 
> $ dc
> 2 k
> 43.81 95.53 21.90 18.90 37.72 174.89 16.73 13.56 + + + + + + + p
> 423.04

You have "13.56" in the second list of numbers but not the first, and 
"18.56" in the first set (not the second set).


In `bc`, I get:

scale = 4
43.81000 + 95.53000 + 21.90000 + 18.90000 + 37.72000 + 174.89000 + 
16.73000 + 18.56000
428.04000


rb



More information about the Semibug mailing list