Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4686820

narrowing from float -NaN to int should produce constant 0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • None
    • 1.4.1
    • hotspot
    • None
    • generic
    • solaris_8

    Description

      javac fails jacks test

      ==== 5.1.3-nan-1 narrowing from float NaN to int produces 0 FAILED
      ==== Contents of test case:

          constant_expression T513nan1 {(int) Float.NaN == 0} {(int) -Float.NaN == 0}

      ---- Result was:
      FAIL
      ---- Result should have been:
      PASS
      ==== 5.1.3-nan-1 FAILED


      ==== 5.1.3-nan-2 narrowing from double NaN to int produces 0 FAILED
      ==== Contents of test case:

          constant_expression T513nan2 {(int) Double.NaN == 0} {(int) -Double.NaN == 0}

      ---- Result was:
      FAIL
      ---- Result should have been:
      PASS
      ==== 5.1.3-nan-2 FAILED


      Attachments

        Issue Links

          Activity

            People

              gafter Neal Gafter
              gafter Neal Gafter
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: