[Haskell-cafe] approximating pi
jerzy.karczmarczuk at info.unicaen.fr
jerzy.karczmarczuk at info.unicaen.fr
Mon Apr 28 03:47:44 EDT 2008
Benjamin L. Russell:
> Assuming the square had 100 pixels per side, on the average, approximately
> how many random pixels should be plotted in the square before obtaining a
> reasonably good estimate of pi?
Nothing to do with Haskell...
What do you mean by "reasonable"? This Monte-Carlo procedure is very
inefficient anyway. The relative error falls as 1/sqrt(N) where N is the
number of samples, so, several hundred thousands of samples may give you
just three significant digits.
And, at any rate, this has nothing to do with pixels, what, introduce
one more source of errors through the truncation of real randoms?
Jerzy Karczmarczuk
More information about the Haskell-Cafe
mailing list