Skip to content

simonherlin/monte_carlo_PI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Approximation PI value with monte carlo method

Example of calculating the approximation of the PI value with the monte carlo method

The method then consists in drawing at random numbers x and y in the interval [0,1]; if x2 + y2 <1 the point M (x, y) belongs to the quarter disc of radius 1. and is drawn in blue, otherwise it is colored red. The probability of obtaining a blue dot is equal to the ratio of the areas of the quarter disc of radius 1 and the square of side 1. It is therefore π / 4.

Picture off the simulation

alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages