Skip to content

Generates the PI number by doing a Montecarlo simulation

License

Notifications You must be signed in to change notification settings

mgierschdev/montecarlo-pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Montercarlo-Pi

Generated the PI number by doing a Montecarlo simulation.

By generating 1000000000 random points in a plane we get the first 3 decimals of PI in around 1 min, this could be optimized. We count the number of points that are within a square and circle in the plane, both the circle and the square in the plane have the property circle radio = square side length, by doing this and dividing both number circleStack / SquareStack, we get an approximation of PI.

Approximation plotted Notebook script

PI

About

Generates the PI number by doing a Montecarlo simulation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published