Function vstd::layout::is_power_2

source ·
pub open spec fn is_power_2(n: int) -> bool
Expand description
{ if n <= 0 { false } else if n == 1 { true } else { n % 2 == 0 && is_power_2(n / 2) } }