Integer Logarithm Library for Rust

API List

  1. roundup_pow2(x) for u8 ... u64, returns same integer type.
  2. rounddown_pow2(x) for u8 ... u64, returns same integer type.
  3. bit_length(), returns usize
  4. lsb(x) for u8 ... u64, returns i8, -1i8 on error.
  5. msb(x) for u8 ... u64, returns i8, -1i8 on error.