Double.doubleToLongBits

Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout.

<p>Bit 63 (the bit that is selected by the mask {@code 0x8000000000000000L}) represents the sign of the floating-point number. Bits 62-52 (the bits that are selected by the mask {@code 0x7ff0000000000000L}) represent the exponent. Bits 51-0 (the bits that are selected by the mask {@code 0x000fffffffffffffL}) represent the significand (sometimes called the mantissa) of the floating-point number.

<p>If the argument is positive infinity, the result is {@code 0x7ff0000000000000L}.

<p>If the argument is negative infinity, the result is {@code 0xfff0000000000000L}.

<p>If the argument is NaN, the result is {@code 0x7ff8000000000000L}.

<p>In all cases, the result is a {@code long} integer that, when given to the {@link #longBitsToDouble(long)} method, will produce a floating-point value the same as the argument to {@code doubleToLongBits} (except all NaN values are collapsed to a single "canonical" NaN value).

@param value a {@code double} precision floating-point number. @return the bits that represent the floating-point number.

class Double
static @trusted nothrow
long
doubleToLongBits
(
double value
)

Meta