Java Double longBitsToDouble() MethodThe longBitsToDouble() method of Java Double class returns the double value equating to an acknowledged bit representation. The result is:
SyntaxParametersbits - is the long integer passed. Return valueThe longBitsToDouble() method returns a floating point value of type double with identical bit pattern. Example 1Test it NowOutput: Float value after conversion = 3.7928E-316 Float value after conversion = 2.40447E-319 Float value after conversion = NaN Example 2Test it NowOutput: 1. 2139095040 value = 1.0568533725E-314 2. 2139095040 value = NaN 3. 2147483647 value = 1.060997895E-314 4. -2147483648 value = NaN Example 3Test it NowOutput: Enter first integer: 648375 1. Double value = 3.2034E-318 Enter Second negative integer -48755 2. Double value = NaN
Next TopicJava Double
|