Calculates log2
log2(n)
// Undefined value returns -1 assert(log2(0) == -1); assert(log2(17) == 4); assert(log2(177) == 7); assert(log2(0x1000_000_000) == 36);
Calculates log2