in reply to Re: Monte Carlo approximation of PI
in thread Monte Carlo approximation of PI

I just ran a simulation with 16 million uniformely distributed points, and using both < 1 and <= 1 give estimates of 3.141020.

Round-off errors probably pay their toll as well, even on my 64bit perl.

Abigail

Replies are listed 'Best First'.
Re: Re: Monte Carlo approximation of PI
by robartes (Priest) on Apr 04, 2003 at 14:16 UTC
    OK. Let's file the < vs <= issue under 'premature (or even unnecessary) optimization' then (although not optimization in the speed sense :) ).

    CU
    Robartes-