def testApproximatePi(self):
    three = F(3)
    (lasts, t, s, n, na, d, da) = (0, three, 3, 1, 0, 0, 24)
    while (abs((s - lasts)) > F(1, (10 ** 9))):
        lasts = s
        (n, na) = ((n + na), (na + 8))
        (d, da) = ((d + da), (da + 32))
        t = ((t * n) / d)
        s += t
    self.assertAlmostEqual(math.pi, s)
def testApproximatePi(self):
    three = F(3)
    (lasts, t, s, n, na, d, da) = (0, three, 3, 1, 0, 0, 24)
    while (abs((s - lasts)) > F(1, (10 ** 9))):
        lasts = s
        (n, na) = ((n + na), (na + 8))
        (d, da) = ((d + da), (da + 32))
        t = ((t * n) / d)
        s += t
    self.assertAlmostEqual(math.pi, s)