Function gbdt::fitness::almost_equal
source · [−]Expand description
Comparing two number with default floating error threshold.
Example
use gbdt::fitness::almost_equal;
assert_eq!(false, almost_equal(1.0, 0.998));
assert_eq!(true, almost_equal(1.0, 0.999998));