...
Because this unordered property is often unexpected, problems can arise when programmers write code that compares floating-point values without considering the semantics of NaN
. For example, input validation checks that fail to consider the possibility of a NaN
value as input can produce unexpected results. See rule "NUM11NUM08-J. Check floating-point inputs for exceptional values" for additional information.
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="07e0f0437c6ab6c4-d0538aff-424c4216-9c2395fe-92c430c4f9efee07e401dfad"><ac:plain-text-body><![CDATA[ | [[FindBugs 2008 | AA. Bibliography#FindBugs 08]] | FE: Doomed test for equality to NaN | ]]></ac:plain-text-body></ac:structured-macro> | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e09359f855b1622b-5c7827d4-456b4f61-8482bc13-4ff531f5cba05bdd7eba362f"><ac:plain-text-body><![CDATA[ | [[JLS 2005 | AA. Bibliography#JLS 05]] | [§4.2.3, "Floating-Point Types, Formats, and Values" | http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.2.3] | ]]></ac:plain-text-body></ac:structured-macro> |
...
NUM06-J. Use the strictfp modifier for floating point calculation consistency across platforms 03. Numeric Types and Operations (NUM) NUM11-J. Check floating-point inputs for exceptional values