Skip to content

Latest commit

 

History

History
4 lines (3 loc) · 542 Bytes

README.md

File metadata and controls

4 lines (3 loc) · 542 Bytes

Compute PI Using Random Points

π is the ratio of a circle's circumference to its diameter, a method for computing π is to draw a circle inscribed in a square, and randomly placing points in the square. Assuming an infinite (a large enough) number of points, the ratio of points inside the circle to the total number of points is equal to π/4. Write Scheme functions to estimate the value of π using this method. Assume the value of the radius of the circle to be 1 and, the side of the square is equal to the diameter of the circle.