@@ -1425,13 +1425,29 @@ public static long doubleToLongBits(double value) {
14251425 * This method chooses to define positive zero ({@code +0.0d}),
14261426 * to be greater than negative zero ({@code -0.0d}).
14271427 * </ul>
1428-
1428+ *
14291429 * This ensures that the <i>natural ordering</i> of {@code Double}
14301430 * objects imposed by this method is <i>consistent with
14311431 * equals</i>; see {@linkplain ##equivalenceRelation this
14321432 * discussion for details of floating-point comparison and
14331433 * ordering}.
14341434 *
1435+ * @apiNote
1436+ * The inclusion of a total order idiom in the Java SE API
1437+ * predates the inclusion of that functionality in the IEEE 754
1438+ * standard. The ordering of the totalOrder predicate chosen by
1439+ * IEEE 754 differs from the total order chosen by this method.
1440+ * While this method treats all NaN representations as being in
1441+ * the same equivalence class, the IEEE 754 total order defines an
1442+ * ordering based on the bit patterns of the NaN among the
1443+ * different NaN representations. The IEEE 754 order regards
1444+ * "negative" NaN representations, that is NaN representations
1445+ * whose sign bit is set, to be less than any finite or infinite
1446+ * value and less than any "positive" NaN. In addition, the IEEE
1447+ * order regards all positive NaN values as greater than positive
1448+ * infinity. See the IEEE 754 standard for full details of its
1449+ * total ordering.
1450+ *
14351451 * @param anotherDouble the {@code Double} to be compared.
14361452 * @return the value {@code 0} if {@code anotherDouble} is
14371453 * numerically equal to this {@code Double}; a value
0 commit comments