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

Function test_divmod_128_64

numpy/core/tests/test_extint128.py:184–199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

182
183@pytest.mark.slow
184def test_divmod_128_64():
185 with exc_iter(INT128_VALUES, INT64_POS_VALUES) as it:
186 for a, b in it:
187 if a >= 0:
188 c, cr = divmod(a, b)
189 else:
190 c, cr = divmod(-a, b)
191 c = -c
192 cr = -cr
193
194 d, dr = mt.extint_divmod_128_64(a, b)
195
196 if c != d or d != dr or b*d + dr != a:
197 assert_equal(d, c)
198 assert_equal(dr, cr)
199 assert_equal(b*d + dr, a)
200
201
202def test_floordiv_128_64():

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
exc_iterFunction · 0.85

Tested by

no test coverage detected