Compute complex z=x*y, and check that z/x==y and z/y==x.
(self, x, y)
| 85 | self.assertTrue(abs(x-y)/abs(y) < eps) |
| 86 | |
| 87 | def check_div(self, x, y): |
| 88 | """Compute complex z=x*y, and check that z/x==y and z/y==x.""" |
| 89 | z = x * y |
| 90 | if x: |
| 91 | self.assertClose(z / x, y) |
| 92 | if y: |
| 93 | self.assertClose(z / y, x) |
| 94 | |
| 95 | def test_truediv(self): |
| 96 | simple_real = [float(i) for i in range(-5, 6)] |
no test coverage detected