Function shr_odd_rounding

Source
const fn shr_odd_rounding(x: u128, k: u32) -> u128
Expand description

Shift right, rounding all inexact divisions to the nearest odd number E.g. (0 >> 4) -> 0, (1..=31 >> 4) -> 1, (32 >> 4) -> 2, …

Useful for reducing a number before rounding the last two bits, since the result of the final rounding is preserved for all rounding modes.