News for hackers. Stuff that matters.
Re:How many draws of a random number [0,1] are needed to sum... by eCa on Sunday February 24, 2013 @02:23PM (#5275499)
Confirmed again:

    perl -e 'my $testcount = 10_000_000; my $total = 0; foreach my $i (0 .. $testcount) { my $sum = 0; while($sum < 1) { $sum += rand(); ++$total } } print $total / $testcount'

    2.7186292

There are no comments on this comment yet.