Class FloatingPointBitsConverterUtil

java.lang.Object
io.trino.operator.aggregation.FloatingPointBitsConverterUtil

public final class FloatingPointBitsConverterUtil extends Object
  • Method Details

    • doubleToSortableLong

      public static long doubleToSortableLong(double value)
      Converts a double value to a sortable long. The value is converted by getting their IEEE 754 floating-point bit layout. Some bits are swapped to be able to compare the result as long.
    • sortableLongToDouble

      public static double sortableLongToDouble(long value)
      Converts a sortable long to double.
      See Also:
    • floatToSortableInt

      public static int floatToSortableInt(float value)
      Converts a float value to a sortable int.
      See Also:
    • sortableIntToFloat

      public static float sortableIntToFloat(int value)
      Coverts a sortable int to float.
      See Also: