Module checked_arithmetics

Source

Functionsยง

checked_int_div
Division implementation that fails in case when a`` isn't divisible by b`
checked_log_2
log2 implementation that fails when val is not a power of 2.
log2_ceil_usize
Computes ceil(log_2(n)).
log2_strict_usize
Computes log_2(n)