340 * } // Value of d approximately 1.0999999999999999
341 * }
342 *
343 * While floating-point arithmetic may have surprising results, IEEE
344 * 754 floating-point arithmetic follows a principled design and its
345 * behavior is predictable on the Java platform.
346 *
347 * @jls 4.2.3 Floating-Point Types, Formats, and Values
348 * @jls 4.2.4. Floating-Point Operations
349 * @jls 15.21.1 Numerical Equality Operators == and !=
350 * @jls 15.20.1 Numerical Comparison Operators {@code <}, {@code <=}, {@code >}, and {@code >=}
351 *
352 * @see <a href="https://standards.ieee.org/ieee/754/6210/">
353 * <cite>IEEE Standard for Floating-Point Arithmetic</cite></a>
354 *
355 * @author Lee Boynton
356 * @author Arthur van Hoff
357 * @author Joseph D. Darcy
358 * @since 1.0
359 */
360 @jdk.internal.ValueBased
361 public final class Double extends Number
362 implements Comparable<Double>, Constable, ConstantDesc {
363 /**
364 * A constant holding the positive infinity of type
365 * {@code double}. It is equal to the value returned by
366 * {@code Double.longBitsToDouble(0x7ff0000000000000L)}.
367 */
368 public static final double POSITIVE_INFINITY = 1.0 / 0.0;
369
370 /**
371 * A constant holding the negative infinity of type
372 * {@code double}. It is equal to the value returned by
373 * {@code Double.longBitsToDouble(0xfff0000000000000L)}.
374 */
375 public static final double NEGATIVE_INFINITY = -1.0 / 0.0;
376
377 /**
378 * A constant holding a Not-a-Number (NaN) value of type
379 * {@code double}. It is equivalent to the value returned by
|
340 * } // Value of d approximately 1.0999999999999999
341 * }
342 *
343 * While floating-point arithmetic may have surprising results, IEEE
344 * 754 floating-point arithmetic follows a principled design and its
345 * behavior is predictable on the Java platform.
346 *
347 * @jls 4.2.3 Floating-Point Types, Formats, and Values
348 * @jls 4.2.4. Floating-Point Operations
349 * @jls 15.21.1 Numerical Equality Operators == and !=
350 * @jls 15.20.1 Numerical Comparison Operators {@code <}, {@code <=}, {@code >}, and {@code >=}
351 *
352 * @see <a href="https://standards.ieee.org/ieee/754/6210/">
353 * <cite>IEEE Standard for Floating-Point Arithmetic</cite></a>
354 *
355 * @author Lee Boynton
356 * @author Arthur van Hoff
357 * @author Joseph D. Darcy
358 * @since 1.0
359 */
360 @jdk.internal.MigratedValueClass
361 @jdk.internal.ValueBased
362 public final class Double extends Number
363 implements Comparable<Double>, Constable, ConstantDesc {
364 /**
365 * A constant holding the positive infinity of type
366 * {@code double}. It is equal to the value returned by
367 * {@code Double.longBitsToDouble(0x7ff0000000000000L)}.
368 */
369 public static final double POSITIVE_INFINITY = 1.0 / 0.0;
370
371 /**
372 * A constant holding the negative infinity of type
373 * {@code double}. It is equal to the value returned by
374 * {@code Double.longBitsToDouble(0xfff0000000000000L)}.
375 */
376 public static final double NEGATIVE_INFINITY = -1.0 / 0.0;
377
378 /**
379 * A constant holding a Not-a-Number (NaN) value of type
380 * {@code double}. It is equivalent to the value returned by
|