private static double doubleHighPart ( double d ) { if ( d > - Precision . SAFE_MIN && d < Precision . SAFE_MIN ) { return d ; // These are un-normalised - don't try to convert } long xl = Double . doubleToLongBits ( d ) ; xl = xl & MASK_30BITS ; // Drop low order bits return Double . longBitsToDouble ( xl ) ; }
Get the high order bits from the mantissa . Equivalent to adding and subtracting HEX_40000 but also works for very large numbers