Test for NaN in java
<p>I'm wondering if there is a way to test for NaN in java. The code below is returning NaN where it should be returning "NA".</p>

<pre><code>if (tempAlloc == Double.NaN) {
                tv4.setText("NA");
            } else {
                tv4.setText(customFormat("###.#%",
                        Double.toString(tempAlloc)));
            }
</code></pre>
