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>=
returnfalse
if either or both operands areNaN
. The equality operator==
returnsfalse
if either operand isNaN
, and the inequality operator!=
returnstrue
if either operand isNaN
.
...
Comparisons with NaN
values may lead to unexpected results.
Rule Guideline | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
FLP05-J | low | probable | medium | P4 | L3 |
...