The procedure p gives an approximation for Pi. Idea is to place a unit circle in a unit square, throw in some random points (which eventually will be plotted into this figure) and count the points inside the circle. For large n, the quotient n_circle/n_square should tend to Pi/4. But for large n, there may be faster ways to program this, what would you improve ? But keep the principle of this algorithm as it is. I'd love to have at least 200k points, but this takes annoying 25s on my machine on each run....