Double.equals for NaN and -0.0
November 30th, 2009, 12:56 pm by MathiasI just fixed two bugs in DrJava that had to do with boxed floating-point comparisons of NaN and -0.0.
Both bugs had the same cause, a difference between the behavior of primitive == and the equals method in Double and Float.
According to IEEE 754, any NaN isn’t equal to anything, not even itself. Therefore, Double.NaN==Double.NaN should [...]

