Simple π

This little demo uses two random numbers r1 and r2 and then does a comparison r1^2 + r2^2 < 1.0 to figure out whether the generated point is inside the first quadrant of the unit circle.

This analysis is on GitHub.
Live demos.


π = 0.0 ± 1.0