Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-4906

Double.NaN == Double.Nan should evaluate to false

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • None
    • None
    • groovy-runtime
    • None

    Description

      I think Double.NaN == Double.NaN should evaluate to false.
      The reasons why are documented in the Java Language Specification.

      IMO, we should stick with the JLS on this issue and not dispatch to the .equals method (or whatever GroovyTruth is doing).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hamletdrc Hamlet D'Arcy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: