check_relative

Function check_relative 

Source
pub fn check_relative(left: f64, right: f64, delta: f64) -> Result<(), String>
Expand description

Checks whether the quotient of the difference between the two floats over the largest (by magnitude) of the two floats, taken as an absolute value, is within the supplied delta threshold.

ยงErrors

If the quotient (gamma) exceeds delta.