calculate pi by Leibniz series