Comment Comment by dlwh to add another: System.out.println(0.0 == -0.0); // true System.out.println(java.util.Arrays.equals(new double[] {0.0}, new double[] {-0.0})); // false (It's documented in the contract for Arrays.equals, but still kind of ridiculous.) parent dlwh 11 years ago