Bit oriented

ReturnMethodSummary
static longdoubleToLongBits(double value)Returns a IEEE 754 floating-point "double format" bit layout.
static longdoubleToRawLongBits(double value)Returns a IEEE 754 floating-point "double format" bit layout, preserving Not-a-Number (NaN) values.
static doublelongBitsToDouble(long bits)Returns the double value corresponding to a given bit representation.

public class Main {
  public static void main(String[] args) {
    
    System.out.println(Double.doubleToLongBits(1.2));

  }
}

The output:


4608083138725491507
java2s.com  |  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.