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

Deoptimizing negation produces wrong result for zero

XMLWordPrintable

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

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

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

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

                Created:
                Updated:
                Resolved: