>>> log2_int((1 << 64) + 1, need_pow2=False) 65 >>> math.ceil(math.log2((1 << 64) + 1)) 64