8343819: Link Float.NaN and Double.NaN to equivalence discussion in Double

Reviewed-by: darcy
This commit is contained in:
Eirik Bjørsnøs 2024-11-09 05:53:16 +00:00
parent 52c0b09b62
commit 8a69893e1d
2 changed files with 6 additions and 6 deletions

View File

@ -375,9 +375,9 @@ public final class Double extends Number
public static final double NEGATIVE_INFINITY = -1.0 / 0.0;
/**
* A constant holding a Not-a-Number (NaN) value of type
* {@code double}. It is equivalent to the value returned by
* {@code Double.longBitsToDouble(0x7ff8000000000000L)}.
* A constant holding a Not-a-Number (NaN) value of type {@code double}.
* It is {@linkplain Double##equivalenceRelation equivalent} to the
* value returned by {@code Double.longBitsToDouble(0x7ff8000000000000L)}.
*/
public static final double NaN = 0.0d / 0.0;

View File

@ -93,9 +93,9 @@ public final class Float extends Number
public static final float NEGATIVE_INFINITY = -1.0f / 0.0f;
/**
* A constant holding a Not-a-Number (NaN) value of type
* {@code float}. It is equivalent to the value returned by
* {@code Float.intBitsToFloat(0x7fc00000)}.
* A constant holding a Not-a-Number (NaN) value of type {@code float}.
* It is {@linkplain Double##equivalenceRelation equivalent}
* to the value returned by{@code Float.intBitsToFloat(0x7fc00000)}.
*/
public static final float NaN = 0.0f / 0.0f;