pub fn log2(x: f64) -> f64
The Math.log2() function returns the base 2 logarithm of a number.
Math.log2()
MDN documentation