perl -e ' $runs = 10000000 ; do { $x = rand(1); $y = rand(1); $cnt++ i +f $x*$x + $y*$y>1 } foreach (1 .. $runs); print 4*(($runs-$cnt)/$runs +)."\n"'

Replies are listed 'Best First'.
Re: Happy PI day!
by atcroft (Abbot) on Mar 14, 2015 at 22:20 UTC