Function hilbert::normalize::bits_required[][src]

pub fn bits_required<N>(n: N) -> usize where
    N: Into<u64>, 
Expand description

Find the minimum number of bits required to represent the given number.

Examples:

  • bits_required(7) returns 3, because 2^3 = 8 which is greater than 7.
  • bits_required(16) returns 5, because 2^5 = 32 which is greater 16.