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

Function test_shl_128

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

Source from the content-addressed store, hash-verified

148
149
150def test_shl_128():
151 with exc_iter(INT128_VALUES) as it:
152 for a, in it:
153 if a < 0:
154 b = -(((-a) << 1) & (2**128-1))
155 else:
156 b = (a << 1) & (2**128-1)
157 c = mt.extint_shl_128(a)
158 if b != c:
159 assert_equal(c, b)
160
161
162def test_shr_128():

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
exc_iterFunction · 0.85

Tested by

no test coverage detected