Skip to main content

bit_preserving_nz

Function bit_preserving_nz 

Source
fn bit_preserving_nz(n: &str) -> bool
Expand description

Bit-preserving integer operations: rotations, byte/bit reversals, endianness conversions, popcount, integer square root and saturating power all map 0 to 0 and non-zero to non-zero, so the result is non-zero iff the operand is (ReturnNonZeroIff).