total_cmp_f

Function total_cmp_f 

Source
pub fn total_cmp_f<T: Float>(a: &T, b: &T) -> Ordering
Expand description

TLDR: Instead of comparing the raw bit patterns directly (which places all negative‐sign bit values after the positives), we transform each bit pattern into a “sort key”: => If the sign bit is 1 (negative or negative‐NaN), we invert all bits: !bits. => Otherwise (sign bit 0), we flip only the sign bit: bits ^ 0x80…0.