Performs numerical estimation of pi.