Skip to main content

uint_to_float_round_up

Function uint_to_float_round_up 

Source
pub fn uint_to_float_round_up(size: u32) -> u32
Expand description

Returns the bin index of the lowest bin that can hold size units.

Bin sizes follow a floating point (exponent + mantissa) distribution — a piecewise linear approximation of a logarithm — which keeps the average overhead of rounding to a bin the same for every size class.