Class Binary64


  • public final class Binary64
    extends Object
    Functions for interrogating binary64 (double) values.
    • Constructor Detail

      • Binary64

        public Binary64()
    • Method Detail

      • unpackGetExponentUnbiased

        public static long unpackGetExponentUnbiased​(double d)

        Extract and unbias the exponent of the given packed double value.

        The exponent is encoded biased as a number in the range [0, 2047], with 0 indicating that the number is subnormal and [1, 2046] denoting the actual exponent plus BIAS. Infinite and NaN values always have a biased exponent of 2047.

        This function will therefore return:

        • 0 - BIAS = -1023 iff the input is a subnormal number.
        • An integer in the range [1 - BIAS, 2046 - BIAS] = [-1022, 1023] iff the input is a normal number.
        • 2047 - BIAS = 1024 iff the input is #POSITIVE_INFINITY, #NEGATIVE_INFINITY, or NaN.
        See Also:
        #packSetExponentUnbiasedUnchecked(int)
      • unpackGetSignificand

        public static long unpackGetSignificand​(double d)

        Return the significand of the given double value.

      • unpackGetSign

        public static long unpackGetSign​(double d)

        Return the sign of the given double value.