Skip to content

OrderedFloat comparison with f32/f64 is not total #143

Description

@orlp

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>?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions