Q:

What is the value set for NaN, POSITIVE_INFINITY and some other constants in Double class?

What is the value set for NaN, POSITIVE_INFINITY and some other constants in Double class? From the source code, I see that they are set to themselves, but how does that work?
public final class Double extends Number implements Comparable<Double> {
    public static final double POSITIVE_INFINITY = POSITIVE_INFINITY;
    public static final double NEGATIVE_INFINITY = NEGATIVE_INFINITY;
    public static final double NaN = NaN;
    public static final double MAX_VALUE = MAX_VALUE;
    public static final double MIN_VALUE = MIN_VALUE;

    ...
}

Thanks.

A:

At least in OpenJDK 8, OpenJDK 9 and OpenJDK 10, they are in the source code:
public static final double POSITIVE_INFINITY = 1.0 / 0.0;
public static final double NEGATIVE_INFINITY = -1.0 / 0.0;
public static final double NaN = 0.0d / 0.0;  // (*)
public static final double MAX_VALUE = 0x1.fffffffffffffP+1023;
public static final double MIN_VALUE = 0x0.0000000000001P-1022;

(*) In case you're wondering about the "d"...

