Skip to main content

quantize_float

Function quantize_float 

Source
pub fn quantize_float(value: f32, bits: u32) -> Result<f32, Error>
Expand description

Round to 0 through 23 mantissa bits. Preserve infinity and NaN payloads; flush all exponent-zero values, including negative zero, to positive zero.

ยงErrors

InvalidParameter if bits is outside the documented range.