To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=85690 Issue #|85690 Summary|RAND() Rounding off Component|Spreadsheet Version|OOo 2.3.1 Platform|PC URL| OS/Version|Windows XP Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|code Assigned to|spreadsheet Reported by|player001
------- Additional comments from [EMAIL PROTECTED] Tue Jan 29 19:24:34 +0000 2008 ------- It seems that Calc doesn't manage to compare exactly a rand() value to a number equal or lower than 1E-6. Indeed, the rand() used to compare looks rounded off in a too high number. Let's take: p=1E-7 in Cell B1 enter in A1: IF(RAND()<$B$1;1;0) Copy-paste until A10000 Set Cell A100001: =Sum of the numbers below Now let's update the page with F9. You must notice you have about a "1", in the sum, every 10 tries. Nevertheless, we should have, in the average : 10000*1E-7=1E-3 which is to say we should only have one match for 1000 tries. You'll notice that using p=1E-9 or 1E-10, or whatever lower, gives you, in the average, such results. In Basic this loop generates the same results: For i=1 to 10 000 'or as much as you want If RND()<1E-7 Then m=m+1 'i choosed m cause I used that loop to calculte the number of mutations given by bacterias with a p rate very low End if Next i I checked out that defect with another version (2.3.0 English), on another computer (still XP). The defect must be due to rounding off errors as I've ever heard, alas ! that Calc had had difficulties rounding numbers close to the digits limit (cf. Euler Estimate). PS: I apologize if it seems confused due to my english, just ask me. --------------------------------------------------------------------- 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]