Return ceil(n / 2**b) without performing any floating-point or division operations.
This is done by right-shifting n by b bits and incrementing the result by 1
if any '1' bits were shifted out.
exact_log2(num)
Find and return an integer i >= 0 such that num == 2**i.
If no such integer exists, this function raises ValueError.
exact_div(p,
d,
allow_divzero=False)
Find and return an integer n such that p == n * d
If no such integer exists, this function raises ValueError.
Both operands must be integers.
If the second operand is zero, this function will raise ZeroDivisionError
unless allow_divzero is true (default: False).