I want to implement a scoring function which returns float like values (but never NaN etc.) and find the minimum values of a list with min_by
. As min_by
requires its values to implement core::cmp::Ord
, I can't use f32
and f64
(which don't have a total ordering).
Is there any floating point alternative in the library implementing core::cmp:Ord
and if not, how do I build an alternative that excludes non-real values?