Cells with same value are different?

Hello, Libreoffice 26.2.3.2 ARRCH64 - Macbook air Tahoe 26.5

sum error.ods (12.0 KB)

Cell c8 contains sum of cells b4 thru g4.
cells b6 & b7 contain currency.
cell c8 contains $59.96.
cells b10 & c10 campare differently. thay should both agree.
Am i doing something wrong or is this a bug?
Thank you, Charles.

Hi @Chuckers1, no problem here…
I formatted cells B10, C10, and B13 as Logical Values.

sum error_GS.ods (11,9,KB)

Win10 + LibO 26.2.4.1

To answer your specific questions:

Yes.

No.
See Frequently asked questions - Calc: Accuracy problem - The Document Foundation Wiki for the reason that B8 actually has the value -59.9600000000003, which is truncated when you apply currency format.

Replace the formula in B8 with =ROUND(SUM(B4:G4);2)

3 Likes

hello
In the options, there is the possibility of performing calculations with the displayed values.

1 Like

Thank you very much. All solutions work however i still don’t understand (read the wiki) why libreoffice would add minute values to cells.

hello
Sometimes it’s difficult to convert decimal to binary, or calculation results can lead to widely spaced decimal places.

1 Like

Thank You.

https://wiki.documentfoundation.org/Faq/Calc/Accuracy#Inherent_Accuracy_Problem