Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

        def how_many_bits(num):
    if num > 0 :
        return int(log(num, 2)) + 2
    elif num < -1:
        return int(log(abs(num)-1, 2)) + 2
    else:
        return 1
        


src/c/h/chips-HEAD/test/test_chips.py   chips(Download)
    for j in range(0, 8):
        b.append(j)
        z.append(resize(a<<j, chips.common.how_many_bits(a)))
 
    stimulus_b =        Sequence(*b)
    for j in range(0, 8):
        b.append(j)
        z.append(resize(a, chips.common.how_many_bits(a))>>j)
 
    stimulus_b =        Sequence(*b)

src/c/h/Chips-0.1.2/test/test_chips.py   Chips(Download)
    for j in range(0, 8):
        b.append(j)
        z.append(resize(a<<j, chips.common.how_many_bits(a)))
 
    stimulus_b =        Sequence(*b)
    for j in range(0, 8):
        b.append(j)
        z.append(resize(a, chips.common.how_many_bits(a))>>j)
 
    stimulus_b =        Sequence(*b)