pub const fn checked_log_2(val: usize) -> usize
log2 implementation that fails when val is not a power of 2.
val