is_pow2

Function is_pow2 

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

Returns true if the given integer is a power of 2 (defined recursively).