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

comparisons with NaN should always return false

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.5.7, 1.6-rc-2
    • Fix Version/s: 3.x
    • Component/s: groovy-runtime
    • Labels:
      None
    • Environment:
      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

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

                Dates

                • Created:
                  Updated: