I was looking at the implementation of compare(double, double) in the Java standard library (6). It reads:
public static int compare(double d1, double d2) {
That implementation allows a real number to be defined as < NaN, and -0.0 as < 0.0.