Java Utililty Methods Double to Long

List of utility methods to do Double to Long

Description

The list of methods to do Double to Long are organized into topic(s).

Method

longdoubleToRawLongBits(double d)
double To Raw Long Bits
return Double.doubleToRawLongBits(d);
longdoubleToRawLongBits(double value)
Encode a double in a long.
return Double.doubleToRawLongBits(value);
longdoubleToS390LongBits(double ieeeDouble)
Converts an IEEE double to an S390 double (as a long).
long ieeeLongBits = Double.doubleToLongBits(ieeeDouble);
boolean positive = ((ieeeLongBits & DOUBLE_SIGN_MASK) == 0);
if ((ieeeLongBits & 0x7fffffffffffffffL) == 0) {
    return ieeeLongBits;
long exponent = ieeeLongBits & DOUBLE_EXPONENT_MASK;
exponent = exponent >>> 52;
exponent = exponent - DOUBLE_BIAS;
...
longdoubleToSortableLong(double val)
Converts a double value to a sortable signed long.
return sortableDoubleBits(Double.doubleToLongBits(val));
longdoubleToSortableLong(double value)
Converts a sortable long to double.
long bits = Double.doubleToRawLongBits(value);
return bits ^ (bits >> 63) & Long.MAX_VALUE;