Skip to main content

rounding_divide_by_pot

Function rounding_divide_by_pot 

Source
pub fn rounding_divide_by_pot(x: i32, exponent: i32) -> i32
Expand description

x / 2^exponent, rounded to nearest with gemmlowp’s tie rule (C++ roundingDivideByPOT). An exponent of zero or less returns x; the documented range ends at 31, and larger exponents are treated as 31.