Use isNaN to check for NaN

Proprietary

Replace primitive floating-point equality or inequality with the attributed JDK Double.NaN or Float.NaN constant with Double.isNaN or Float.isNaN. Equality with NaN is always false, even for NaN itself. Test sources are excluded because tests may deliberately verify that IEEE-754 behavior. Ordered comparisons, custom constants, comments and boxed operands are left alone. Preserve existing type qualifiers; cross-precision comparisons and unproven static-import output namespaces are left alone.

io.moderne.staticanalysis.UseIsNaN
mod run . --recipe=io.moderne.staticanalysis.UseIsNaN

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.