Description: In LibreOffice Calc mathematical rounding error occur in Cell D42 when adding mathematical formula values from cells D39 and D40. If you need, i can send the File to you. Actual Results: D33 has the value 211718.850; D34 has the value 216257.900; D35 mathematical Formula =Sum(D34-D33); D36 has a value of €0.1257; D39 mathematical formula =Sum(D35*D36) -Value is 570.56€; B40 has a value of 19; D40 mathematical formula=Sum((D39*B40)/100 - value is €108.41; D42 mathematical formula=Sum(D39+D40) - value is €678.96. This value should be €678.97!! ! Expected Results: 678,97€ in Cell D42 Reproducible: Always User Profile Reset: No Additional Info: I don't know what I can write here
Created attachment 192389 [details] Demo document I attached a sample document that reproduce the "bug". Let's wait for developers to analyze if this is a bug or not.
Created attachment 192390 [details] Demo document (simplified version) I eliminated here sum() from all the formulas.
With default settings, this is not a bug. The result provided is *less* than 678.965, so the displayed result should not be 678.97. There are additional accuracy concerns regarding spreadsheets in general, but they are not relevant for the specific value in question. Performing the calculations with a normal calculator would not result in such value either. Perhaps you are using some kind of truncation (whether in Calc or in a normal Calculator), or using some kind of "Precision as shown" option, which makes you think that the result is incorrect. In such case, the result might vary, depending on the amount of decimals being considered in each step. IOW, with default settings in Calc, the values are not really "108.41" (108.40613115) nor "570.56" (570.558585). If you want them to be considered with 2 decimals (only) before each calculation, I would suggest using the TRUNC() function on each calculated cell, or one of the related functions available. With the information as provided, I don't see the problem. Maybe the real file needs to be attached. Please be aware that it will be publicly available, so you might not want to do that. In any case, this question seems more adequate at this moment for <https://ask.libreoffice.org> or for the user mailing list rather than for a proven bug report. I am not a developer, so maybe someone else might have a different opinion.
(In reply to ady from comment #3) > I would suggest using the > TRUNC() function on each calculated cell, or one of the related functions > available. ... such as ROUND(), among others.
there is NO error .using 5 decimal places the result is 678.9647 which correctly rounds to 678.96