pub fn almost_equal(a: ValueType, b: ValueType) -> bool
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));