Groovy
  1. Groovy
  2. GROOVY-3309

comparisons with NaN should always return false

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.5.7, 1.6-rc-2
    • Fix Version/s: 3.0
    • 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

        Activity

        Andy Fyfe created issue -
        Guillaume Delcroix made changes -
        Field Original Value New Value
        Fix Version/s 1.5.8 [ 14630 ]
        Fix Version/s 1.6.1 [ 14852 ]
        Fix Version/s 1.7-beta-1 [ 14014 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.6.1 [ 14852 ]
        Fix Version/s 1.6.2 [ 15151 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.5.8 [ 14630 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.6.3 [ 15251 ]
        Fix Version/s 1.6.2 [ 15151 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.6.3 [ 15251 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.7-beta-x [ 15538 ]
        Fix Version/s 1.7-beta-1 [ 14014 ]
        Jochen Theodorou made changes -
        Fix Version/s 2.x [ 17013 ]
        Fix Version/s 1.8.x [ 15750 ]
        Fix Version/s 1.7.x [ 15538 ]
        Jochen Theodorou made changes -
        Fix Version/s 3.0 [ 13489 ]
        Fix Version/s 2.x [ 17013 ]
        Fix Version/s 1.8.x [ 15750 ]
        Jochen Theodorou made changes -
        Component/s groovy-runtime [ 16250 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12732305 ] Default workflow, editable Closed status [ 12744108 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12970131 ] Default workflow, editable Closed status [ 12977907 ]

          People

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

            Dates

            • Created:
              Updated:

              Development