Skip to content

yovendielmundo/montecarlo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

montecarlo

A Method to Estimate π (3.14...)

Consider a square and a circle of radius one inside a square:

Ratio between the surfaces of 1/4 of a circle and 1/4 of a square:

λ = ( ((1ˆ2)π/4) / (2ˆ2/4) ) = π/4

Estimating λ: randomly sample points inside the square, count how many fall inside the circle, multiply this ratio by 4 for an estimate of π

About

A Method to Estimate π (3.14...)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages