fn max2floor(mut n: u32) -> u32 {
    let mut val: i32 = 1;
    while n > 1_u32 {
        n = n.wrapping_div(2_u32);
        val *= 2
    }
    val as u32
}
/*
 * Computes the max power of 2 <= n
 */
Computes the max power of 2 <= n
Computes the max power of 2 < = n
fn max2floor(mut n: u32) -> u32 {
    let mut val: i32 = 1;
    while n > 1_u32 {
        n = n.wrapping_div(2_u32);
        val *= 2
    }
    val as u32
}
fn max2floor ( mut n : u32 ) -> u32 { let mut val : i32 = 1 ; while n > 1_u32 { n = n . wrapping_div ( 2_u32 ) ; val *= 2 } val as u32 }
Computes the max power of 2 <= n
Computes the max power of 2 < = n
n
u32