You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it intended that OrderedFloat(x) == y where x, y are float types is not a total comparison? This only matters for NaN: OrderedFloat(f32::NAN) == OrderedFloat(f32::NAN) is true, but OrderedFloat(f32::NAN) == f32::NAN is false.
On another note, why is PartialEq<Rhs=T> for OrderedFloat<T> implemented, but the same does not hold true for PartialOrd<Rhs=T> for OrderedFloat<T>?
The text was updated successfully, but these errors were encountered:
Is it intended that OrderedFloat(x) == y where x, y are float types is not a total comparison? This only matters for NaN: OrderedFloat(f32::NAN) == OrderedFloat(f32::NAN) is true, but OrderedFloat(f32::NAN) == f32::NAN is false.
No, I don’t think this is intended; as far as I know we just never thought about which result would be better.
On another note, why is PartialEq<Rhs=T> for OrderedFloat<T> implemented, but the same does not hold true for PartialOrd<Rhs=T> for OrderedFloat<T>?
Is it intended that
OrderedFloat(x) == y
wherex, y
are float types is not a total comparison? This only matters for NaN:OrderedFloat(f32::NAN) == OrderedFloat(f32::NAN)
is true, butOrderedFloat(f32::NAN) == f32::NAN
is false.On another note, why is
PartialEq<Rhs=T> for OrderedFloat<T>
implemented, but the same does not hold true forPartialOrd<Rhs=T> for OrderedFloat<T>
?The text was updated successfully, but these errors were encountered: