Revert line of code in function get_mete_Pi() because the mathematical simplification which is faster experiences rounding problems which result in dividing by zero. The loop form is more accurate and thus is prefered despite its slightly slower computation.