java.lang.Double longBitsToDouble(long bits)

Syntax:

public static double longBitsToDouble(long bits)

Java Code Example :

This java example source code demonstrates the use of longBitsToDouble(long bits) method of Double class.

Some takeaways on the longBitsToDouble(long bits) method:

  • Returns the double value corresponding to a given bit representation. The argument is considered to be a representation of a floating-point value according to the IEEE 754 floating-point “double format” bit layout.
  • If the argument is 0x7ff0000000000000L, the result is positive infinity.
  • If the argument is 0xfff0000000000000L, the result is negative infinity.

Sample Output :

Running the above example source code will give the following output

Suggested Reading List :

References :