コード例 #1
0
def test_count_trailing_zeros():
    from rpython.rlib.rbigint import ONERBIGINT
    from pycket.arithmetic import count_trailing_zeros
    for i in range(1025):
        assert i == count_trailing_zeros(ONERBIGINT.lshift(i))
コード例 #2
0
ファイル: test_arithmetic.py プロジェクト: pycket/pycket
def test_count_trailing_zeros():
    from rpython.rlib.rbigint import ONERBIGINT
    from pycket.arithmetic    import count_trailing_zeros
    for i in range(1025):
        assert i == count_trailing_zeros(ONERBIGINT.lshift(i))