float-equality-without-abs Require an absolute difference in Number.EPSILON comparisons left - right < Number.EPSILON accepts every negative difference, including values that are arbitrarily far apart. Instead, you SHOULD compare the absolute difference: (left - right).abs() < Number.EPSILON. The absolute value is unnecessary only when left >= right is a proven invariant. - Category: correctness - Level: warning - Fix: suggestion - Scope: module Reported function approximatelyEqual(left: float64, right: float64): boolean { return left - right < Number.EPSILON; } Accepted function approximatelyEqual(left: float64, right: float64): boolean { return (left - right).abs() < Number.EPSILON; } Prior art - Clippy ยท floatequalitywithoutabs language/linter/src/rules/correctness/floatequalitywithoutabs.rs:8