Florian Weimer wrote: > : > Does this happen transparently by the JVM? Double.compare() does not > do it, as far as I can tell. > > Double.compare will use doubleToLongBits. AFAIK, the only method that preserves or exposes NaN values is doubleToRawLongBits. -Alan.