Commit 24cf7c96 authored by Lars Buitinck's avatar Lars Buitinck

test: assert that isinf returns -1 for negative infinity

Makes sure (and documents, in a sense) that isinf's declaration as returning
a bint preserves its C semantics.
parent 1b21f1f3
......@@ -37,7 +37,8 @@ def test_fp_classif():
assert not npmath.isnan(d_zero)
assert not npmath.isnan(f_zero)
assert npmath.isinf(npmath.INFINITY)
assert npmath.isinf(npmath.INFINITY) == 1
assert npmath.isinf(-npmath.INFINITY) == -1
assert npmath.isnan(npmath.NAN)
assert npmath.signbit(npmath.copysign(1., -1.))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment