Save This Page
Home » openjdk-7 » java » lang » [javadoc | source]
java.lang
final class: VMDouble [javadoc | source]
java.lang.Object
   java.lang.VMDouble
Code relocated from java.lang.Double by
Method from java.lang.VMDouble Summary:
doubleToLongBits,   doubleToRawLongBits,   initIDs,   longBitsToDouble,   parseDouble,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.lang.VMDouble Detail:
 public static native long doubleToLongBits(double value)
    Convert the double to the IEEE 754 floating-point "double format" bit layout. Bit 63 (the most significant) is the sign bit, bits 62-52 (masked by 0x7ff0000000000000L) represent the exponent, and bits 51-0 (masked by 0x000fffffffffffffL) are the mantissa. This function collapses all versions of NaN to 0x7ff8000000000000L. The result of this function can be used as the argument to Double.longBitsToDouble(long) to obtain the original double value.
 public static native long doubleToRawLongBits(double value)
    Convert the double to the IEEE 754 floating-point "double format" bit layout. Bit 63 (the most significant) is the sign bit, bits 62-52 (masked by 0x7ff0000000000000L) represent the exponent, and bits 51-0 (masked by 0x000fffffffffffffL) are the mantissa. This function leaves NaN alone, rather than collapsing to a canonical value. The result of this function can be used as the argument to Double.longBitsToDouble(long) to obtain the original double value.
 public static native  void initIDs()
    Initialize JNI cache. This method is called only by the static initializer when using JNI.
 public static native double longBitsToDouble(long bits)
    Convert the argument in IEEE 754 floating-point "double format" bit layout to the corresponding float. Bit 63 (the most significant) is the sign bit, bits 62-52 (masked by 0x7ff0000000000000L) represent the exponent, and bits 51-0 (masked by 0x000fffffffffffffL) are the mantissa. This function leaves NaN alone, so that you can recover the bit pattern with Double.doubleToRawLongBits(double).
 public static native double parseDouble(String str)
 public static native String toString(double d,
    boolean isFloat)
    Helper method to convert to string.