Created attachment 148086 [details] The Calc spreadsheet with the given example The following equation gives a wrong result: 100 - 1.4 - 95.9 - 2.7 = -1,15463194561016E-14 Should be: 0 If the item order is changed, the calculated result is correct: 100 - 95,9 - 1,4 - 2,7 = 0. The tested versions: Fedora 23 / LibreOffice 5.3.2.1 30(Build:1) x64 Fedora 28 / LibreOffice 6.0.7.3.0 00(Build:3) x64 Windows 10 / LibreOffice 6.1.4.2 (Build ID: 9d0f32d1f0b509096fd65e0d4bec26ddd1938fd3) x64
Created attachment 148087 [details] A screen-shot with buggy calculation
This is not a bug, but the result of non-representability of some numbers in computer [1]. Using computer-aided computations, user must be prepared for such things, unfortunately because they are simply unavoidable. It's normal than changing the order of calculations, you get different intermediate results, which may happen to be representable in IEEE 754 form, or may simply happen to be represented closer to ideal values. [1] https://en.wikipedia.org/wiki/Floating-point_arithmetic#Accuracy_problems