Re:Show HN: Pi Approximation using Monte Carlo
by afafsd on Sunday August 10, 2014 @04:45AM
(#8159238)
Would you care to estimate the magnitude of this error, and how many steps you would need before it actually became relevant?
[ Parent
| on HN ]
Re:Show HN: Pi Approximation using Monte Carlo
by darkmighty on Sunday August 10, 2014 @05:05AM
(#8159268)
I believe the error should be (roughly) ~ size of f.p. interval at 1 * pi ~ pi* 2^(-32/64), i.e. barely representable. Number of steps would be ~ 1/(error^2) ~ 2^(2* 32/64).
Even giving 50% probability at the line the result would be minutely biased because of many other things involving the discreteness of the floating point arithmetic. A less biased version would have to maybe increase the resolution around the boundary as number of steps progresses.