Operations and constants for int
bits
of BitCount for int
pow
- Returns base
raised to the power of exponent
bits
uint
BitCount
for int
population_count
fn population_count(&self) -> int
Counts the number of bits set. Wraps LLVM's ctpop
intrinsic.
leading_zeros
fn leading_zeros(&self) -> int
Counts the number of leading zeros. Wraps LLVM's ctlz
intrinsic.
trailing_zeros
fn trailing_zeros(&self) -> int
Counts the number of trailing zeros. Wraps LLVM's cttz
intrinsic.
pow
fn pow(base: int, exponent: uint) -> int
Returns base
raised to the power of exponent