(self)
| 1112 | xi, y + y*1j, nulp) |
| 1113 | |
| 1114 | def test_complex64_pass(self): |
| 1115 | nulp = 5 |
| 1116 | x = np.linspace(-20, 20, 50, dtype=np.float32) |
| 1117 | x = 10**x |
| 1118 | x = np.r_[-x, x] |
| 1119 | xi = x + x*1j |
| 1120 | |
| 1121 | eps = np.finfo(x.dtype).eps |
| 1122 | y = x + x*eps*nulp/2. |
| 1123 | assert_array_almost_equal_nulp(xi, x + y*1j, nulp) |
| 1124 | assert_array_almost_equal_nulp(xi, y + x*1j, nulp) |
| 1125 | y = x + x*eps*nulp/4. |
| 1126 | assert_array_almost_equal_nulp(xi, y + y*1j, nulp) |
| 1127 | |
| 1128 | epsneg = np.finfo(x.dtype).epsneg |
| 1129 | y = x - x*epsneg*nulp/2. |
| 1130 | assert_array_almost_equal_nulp(xi, x + y*1j, nulp) |
| 1131 | assert_array_almost_equal_nulp(xi, y + x*1j, nulp) |
| 1132 | y = x - x*epsneg*nulp/4. |
| 1133 | assert_array_almost_equal_nulp(xi, y + y*1j, nulp) |
| 1134 | |
| 1135 | def test_complex64_fail(self): |
| 1136 | nulp = 5 |
nothing calls this directly
no test coverage detected