(self)
| 1490 | assert_array_max_ulp(nan1_f32, nan2_f32, 0) |
| 1491 | |
| 1492 | def test_float16_pass(self): |
| 1493 | nulp = 5 |
| 1494 | x = np.linspace(-4, 4, 10, dtype=np.float16) |
| 1495 | x = 10**x |
| 1496 | x = np.r_[-x, x] |
| 1497 | |
| 1498 | eps = np.finfo(x.dtype).eps |
| 1499 | y = x + x * eps * nulp / 2. |
| 1500 | assert_array_almost_equal_nulp(x, y, nulp) |
| 1501 | |
| 1502 | epsneg = np.finfo(x.dtype).epsneg |
| 1503 | y = x - x * epsneg * nulp / 2. |
| 1504 | assert_array_almost_equal_nulp(x, y, nulp) |
| 1505 | |
| 1506 | def test_float16_fail(self): |
| 1507 | nulp = 5 |
nothing calls this directly
no test coverage detected