Skip to main content

encode_f64_sortable

Function encode_f64_sortable 

Source
pub const fn encode_f64_sortable(value: f64) -> u64
Expand description

Encode an f64 value for sortable byte comparison.

Uses IEEE 754 sortable encoding:

  • Negative floats: flip all bits
  • Positive floats: flip only sign bit

The result should be written in big-endian format for correct lexicographic ordering.