Created attachment 101032 [details] See cells J21 and J29 for error Problem description: On a spreadsheet where all numbers entered have only 1 or 2 significant decimal digits and ALL operations are either subtraction or addition: the calculations sometimes introduce a rounding error. The only other instruction used is a IF statement which should have no impact on the calculation per se. Steps to reproduce: 1. See attached file in cells J21 and J29 Operating System: Windows 7 Version: 4.2.0.4 release
I copied your example, and opened it with Excel 2013 I got the same results. Apparently, when the result of this is 'wrong': -9425.03 - -9268.98 = -156.050000000001 But also: -9000.03 - -9270.98 = 270.949999999999 If you ROUND the result on 2 decimals, it will compare OK again... ;) I think this is 'the way it works'-behaviour ? Even Microsoft created a page about this: http://support.microsoft.com/kb/214118
Luuk, if there were divisions and multiplications I would agree with you ... actually I would never of brought up the issue. HOWEVER - the spreadshhet contains ONLY subtraction and addition operations which should NEVER INTRODUCE rounding errors. If you look at the Microsoft example there is a multiplication. I repeat (because this is the second time I bring up the subject): a spread sheet with only "+" and "-" operations SHOULD NEVER CONTAIN ROUNDING ERRORS. Andrew
@Andrew: I agree with you that this error should not happen with only "+" and "-" oprations. I also see that Excel 2013 is doing the same thing as LO 4.2.4.2 (which i'm looking at, see my second comment) [ B.T.W.: This is NOT the same as claiming that Excel is GOOD, and that LO should behave the same way was Ecel does!!! ] i will leave this at 'UNCONFIRMED', and wait for someone else to give his/her opinion on this, and mark this as 'CONFIRMED' or as 'IMPROVEMENT'...... ;-)
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.