Description: I create monthly reports for my club. We use a credit card processor to accept payments for dues and other items. Last month, I noticed an error when reconciling the report against the bank statement. Thankfully, it was a small error. This month the error was larger since more dues were paid. By comparing the CC processor's data with the report, there was a discrepancy in the calculation for $25.00. There was no error for more or fewer sums. Just $25.00 I've included a link to the simple calc sheet that describes the error. https://bit.ly/3abVtZe Steps to Reproduce: 1. Four columns (no labels) 2. First column enter 25 3. Second column enter =A1*0.029+0.3 4. Second column calculates the number 1.03 5. Third column subtract value =A1-A2 Actual Results: The third column should be 23.97, yet it calculates to equal 23.98 Expected Results: The third column should be 23.97 Reproducible: Always User Profile Reset: No Additional Info: How to attach file? See my calc sample: https://bit.ly/3abVtZe DOES NOT WORK: https://wiki.documentfoundation.org/UserProfile#Resolving_corruption_in_the_user_profile https://wiki.documentfoundation.org/OpenGL#How_to_enable.2Fdisable_OpenGL
Created attachment 180485 [details] Simple calc sheet
Hi John, thanks for reporting. The reason this is happening is due to how numbers are rounded when you reduce the number of decimal digits shown. In your example, if you showed 3 decimal places you would have. 1.025 (in the 2nd column) and 23.975 (in the 3rd column) If you select these values and ask LO to show only two decimal places, it will show 1.03 (in the 2nd column) and 23.98 (in the 3rd column) But keep in mind that internally the values are still 1.025 and 23.975. You only changed what is being shown, you did not change the actual value. So the calculation is correct. You can try rounding Column C with 2 decimal places in your document before the subtraction in column D.
Created attachment 180500 [details] Calculation using ROUND function In this file I used the Round function in column C. Beware though that the banking system in your country may use different rounding rules. You need to check which rounding rules they're using. Rounding numbers in banks has always been a problem. See: https://en.wikipedia.org/wiki/Cash_rounding
Setting this as NOTABUG since calculation results are correct.