Online Java Compiler By
JavaTpoint.com
public class Double_doubleToRawLongBitsMethod_Example1 { public static void main(String[] args) { //returns the bits that represent the floating-point number Double obj = 5.5; System.out.println(obj + " value in Raw long bits = " + Double.doubleToRawLongBits(obj)); //0/0 argument is NaN, Double obj1 = 0.0 / 0.0; System.out.println(obj1 + " value in Raw long bits =" + Double.doubleToRawLongBits(obj1)); // positive integer divided by zero gives infinity Double obj2 = obj / 0; System.out.println(obj2 + " value in Raw long bits =" + Double.doubleToRawLongBits(obj2)); // negative integer divided by zero gives negative infinity Double obj3 = -obj / 0.0; System.out.println(obj3 + " value in Raw long bits=" + Double.doubleToRawLongBits(obj3)); } }
Output