Пример #1
0
def _complete_to_power_2(num):
  num = math.log2(num)
  hb = num if type(num) == int else int(num) + 1

  return 2 ** hb
Пример #2
0
def _get_period_order(m):
  return list(map(lambda x: _bit_reverse(x, int(math.log2(m))), range(0, m)))