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

comparisons with NaN should always return false

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.5.7, 1.6-rc-2
    • 4.x
    • groovy-runtime
    • None
    • os x, jse 5 and 6

    Description

      The following assertions should all pass; the third fails.

      assert !(Double.NaN == 0)
      assert !(Double.NaN < 0)
      assert !(Double.NaN > 0)
      

      A NaN should also not equal a NaN.

      assert Double.NaN != Double.NaN

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              andyfyfe Andy Fyfe
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: