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

Deoptimizing negation produces wrong result for zero

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P2
    • Resolution: Fixed
    • 9
    • 9
    • core-libs
    • None
    • b17
    • generic
    • generic
    • Verified

    Backports

      Description

        print(1/(function() { var f = 0; return -f; })())

        Correct result is -Infinity. Under optimistic compilation with static type calculation, this produces Infinity.

        Attachments

          Issue Links

            Activity

              People

                attila Attila Szegedi
                attila Attila Szegedi
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: