presto-main/src/main/java/io/prestosql/operator/aggregation/FloatingPointBitsConverterUtil.java/FloatingPointBitsConverterUtil/doubleToSortableLong
class FloatingPointBitsConverterUtil:    public static long doubleToSortableLong(double value)
    {
        long bits = Double.doubleToLongBits(value);
        return bits ^ (bits >> 63) & Long.MAX_VALUE;
    }