Estimating pi using MCMC

By generating points randomly within a square, and checking whether they fall in a circle with the same diameter, we can estimate π based on the proportion of points in the circle.

The more points we sample, the closer we should get to an accurate estimate of pi. However, due to floating point precision issues this simple Javacript implementation of the method probably won't converge to the right answer.

Current estimate of π:

Points sampled: