LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

monte carlo pi

Hi everybody,

 

 I created a VI to determine the value of Pi using monte carlo method. But I am blocked by the precision of the random number. It is a funny VI :womanhappy:

I would like to enhance its precision. Can someone help me to change the precision of the random number. The value of Pi depend on it. You will find attached the VI.

 

Cheers,

0 Kudos
Message 1 of 2
(3,107 Views)

There is a reason why Pi is not calculated this way, the convergence is roughly 1/sqrt(N) where N is the number of tests.  I would display this as you run your VI and see what the expected precision is, and whether or not you are running long enough to have converged to more than 4 or 5 digits.

 

For all of the digits of Pi you can handle, see here:

http://forums.ni.com/t5/BreakPoint/Happy-Pi-Day/td-p/1090569/highlight/true

 

 

0 Kudos
Message 2 of 2
(3,103 Views)