Skip to content

Semantics of Equals is different for System.Half comparing to other floating point types #41258

Closed

Description

@huoyaoyuan

Current behaviour:

Type NaN == NaN NaN.Equals(NaN)
float False True
double False True
Half False False

This is causing the test failure in #40882 , and will cause other problems since Half.Equals does not follow the .NET IEqutable semantics.

Since Half is a newly introduced type, I think the issue should be fixed before 5.0 release.

Activity

  1. added
    untriaged
    on Aug 24, 2020
  2. Dotnet-GitSync-Bot commented on Aug 24, 2020

    @Dotnet-GitSync-Bot
    Collaborator

    I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

  3. added this to the 5.0.0 milestone on Aug 24, 2020
  4. removed
    untriaged
    on Sep 14, 2020
  5. ghost locked as resolved and limited conversation to collaborators on Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions