To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=88429
User discoleo changed the following: What |Old value |New value ================================================================================ Summary|ROUNDDOWN((8.2-8)*10) retu|ROUNDDOWN((8.2-8)*10) retu |rns 1 |rns 1 -------------------------------------------------------------------------------- ------- Additional comments from [EMAIL PROTECTED] Sat Apr 19 12:01:47 +0000 2008 ------- Well, there is an explanation involving floating point operations on computers, but I do not like that explanation very much either. Floating point arithmetic was introduced many decades ago, and now we are in the 21st century, so I hope that more accurate methods will get implemented. The real problem is however slightly different. This issue determined me to analyse how well Calc behaves with floating point operations, and I must say that Calc fails with all decimals, while other programs fail only with some of them: in Clac: =ROUNDDOWN(10*(x - 8)), where x = 8.1 to 9.0 will always yield a number less than the expected value. In other programs (not tested in Excel), it fails only for: 8.1, 8.2 and 8.6 and 8.7 EXPECTED: 1 2 3 4 5 6 7 8 9 10 SEEN in R: 0 1 3 4 5 5 6 8 9 10 * in Calc: 0 1 2 3 4 5 6 7 8 10 ** * commands to compute in R (for comparison, ceiling is also provided) > floor(10*((8+1:10/10)-8)) [1] 0 1 3 4 5 5 6 8 9 10 > ceiling(10*((8+1:10/10)-8)) [1] 1 2 4 5 5 6 7 9 10 10 Expected: 1 2 3 4 5 6 7 8 9 10 ** see attached spreadsheet to see various combinations in Calc It seems that Calc stores even 8.5 as an inaccurate float number, when in fact it is possible to store it accurately. But, mostly I do hope that more powerful algorithms get developed and implemented. And that floating point handling will be better in the future. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]