Probabilistic choice: Difference between revisions

Line 2,740:
 
=={{header|Ring}}==
 
{{improve|Ring| <br> The task states to use one million trials, not five thousand. <br><br>}}
 
If I try one million trials I get the "'''Numeric Owerflow'''" error message.
In '''Ring''' it is possible use a number which has '''maximum 14 digits'''.
 
<lang ring>
Line 2,756 ⟶ 2,751:
prob = [1/5.0, 1/6.0, 1/7.0, 1/8.0, 1/9.0, 1/10.0, 1/11.0, 1759/27720]
for trial = 1 to 50001000000
r = random(10)/10
p = 0
2,468

edits