...
Comparisons with NaN
values may can lead to unexpected results.
...
Automated detection of floating point comparison operators is straightforward. Sound determination of whether the possibility of an unordered result has been correctly handled is not feasible in the general case. Heuristic checks may could be useful.
Findbugs checks for the specific case of comparison with a constant NaN
.
...