what was the rationale for having our own `log2_int()` helper? it seems to be a custom log2 that is also: - defined for n=0 - defined for n<0, if `need_pow2=False` which is quite misleading, given its name