Skip to main content

within_tolerance

Function within_tolerance 

Source
pub fn within_tolerance(value: f64, tolerance: f64) -> bool
Expand description

Check whether quantizing value to f32 stays within tolerance.

Returns true if |value - (value as f32) as f64| <= tolerance.