https://bugs.freedesktop.org/show_bug.cgi?id=50299
--- Comment #22 from [email protected] --- in cell A1 enter 80.9 in cell A2 enter 81 in cell A3 enter 81.1 in cell B1 enter =MOD(A1*100,10) copy it to range B2:B3 B1 = 9.09494701772928E-013 B2 = 0 B3 = 10 Increasing in increments of 0.1, between 64.4 and 82.1, this occurs 36 times. The error in B1 might not hurt anything, but in engineering or medicine, the error in B3 could be fatal, and in finance it would be unacceptable. The same thing in Excel (2003) gives: B1 = 9.09495E-13 B2 = 0 B3 = -9.09495E-13 This calculation performed in LO Calc 4.4.0 Beta2 Dev Daily from 2014 12 18, from 0 to 100 in increments of 0.1 results in 143 such errors out of 1000, the maximum error being 10, the minimum being 1.13686837721616E-013. In Excel 2003, it also results in 143 errors, but the absolute value of no error exceeds 9.09495E-13. The pattern obvious in the errors suggests the way LO and Excel calculate the MOD() are significantly different; Excel is accounting for the fact that small errors the digits not considered significant can cause a result to be below the actual value, so simply taking the integer of a real value when performing the MOD() won't work properly. I have no way of knowing where the problem is, but there is clearly a problem related to rounding error that can result in serious errors, and it's not caused by hardware. When using with the attachment, beware; when I changed A8 & A7 from 100 & 10 to 10 & 1, or changed A7 & A8 from 1 & 10 to 10 & 100, respectively IN THE ORDER SHOWN, recalculation caused strange results in B11 or B12 that required a forced recalculation (Ctrl+Shift+F9). -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
