MCPcopy Create free account
hub / github.com/numpy/numpy / _test_nextafter

Function _test_nextafter

numpy/core/tests/test_umath.py:4434–4443  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

4432 assert_(not np.signbit(np.copysign(np.nan, 1)))
4433
4434def _test_nextafter(t):
4435 one = t(1)
4436 two = t(2)
4437 zero = t(0)
4438 eps = np.finfo(t).eps
4439 assert_(np.nextafter(one, two) - one == eps)
4440 assert_(np.nextafter(one, zero) - one < 0)
4441 assert_(np.isnan(np.nextafter(np.nan, one)))
4442 assert_(np.isnan(np.nextafter(one, np.nan)))
4443 assert_(np.nextafter(one, one) == one)
4444
4445def test_nextafter():
4446 return _test_nextafter(np.float64)

Callers 3

test_nextafterFunction · 0.85
test_nextafterfFunction · 0.85
test_nextafterlFunction · 0.85

Calls 2

assert_Function · 0.90
tFunction · 0.85

Tested by

no test coverage detected