(self)
| 1393 | "sumprod() accuracy not guaranteed on machines with double rounding") |
| 1394 | @support.cpython_only # Other implementations may choose a different algorithm |
| 1395 | def test_sumprod_accuracy(self): |
| 1396 | sumprod = math.sumprod |
| 1397 | self.assertEqual(sumprod([0.1] * 10, [1]*10), 1.0) |
| 1398 | self.assertEqual(sumprod([0.1] * 20, [True, False] * 10), 1.0) |
| 1399 | self.assertEqual(sumprod([True, False] * 10, [0.1] * 20), 1.0) |
| 1400 | self.assertEqual(sumprod([1.0, 10E100, 1.0, -10E100], [1.0]*4), 2.0) |
| 1401 | |
| 1402 | @support.requires_resource('cpu') |
| 1403 | def test_sumprod_stress(self): |
nothing calls this directly
no test coverage detected