Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Wiki Markup
According to the Java Language Specification \[[JLS 2005|AA. Java References#JLS 05]\], Section 4.2.3, "Floating-Point Types, Formats, and Values":

NaN is unordered, so the numerical comparison operators <, <=, >, and >= return false if either or both operands are NaN. The equality operator == returns false if either operand is NaN, and the inequality operator != returns true if either operand is NaN.

...

Comparisons with NaN values may lead to unexpected results.

Rule Guideline

Severity

Likelihood

Remediation Cost

Priority

Level

FLP05-J

low

probable

medium

P4

L3

...