(self)
| 1169 | self.assertAlmostEqual(math.pi, s) |
| 1170 | |
| 1171 | def testApproximateCos1(self): |
| 1172 | # Algorithm borrowed from |
| 1173 | # http://docs.python.org/lib/decimal-recipes.html |
| 1174 | x = F(1) |
| 1175 | i, lasts, s, fact, num, sign = 0, 0, F(1), 1, 1, 1 |
| 1176 | while abs(s - lasts) > F(1, 10**9): |
| 1177 | lasts = s |
| 1178 | i += 2 |
| 1179 | fact *= i * (i-1) |
| 1180 | num *= x * x |
| 1181 | sign *= -1 |
| 1182 | s += num / fact * sign |
| 1183 | self.assertAlmostEqual(math.cos(1), s) |
| 1184 | |
| 1185 | def test_copy_deepcopy_pickle(self): |
| 1186 | r = F(13, 7) |
nothing calls this directly
no test coverage detected