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

Float value stores in int with loss of precision when using += (compound assignment Operato)

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      ADDITIONAL SYSTEM INFORMATION :
      WINDOWS LINUX

      A DESCRIPTION OF THE PROBLEM :
      int intValue = 3;
      // error
      intValue = intValue + 0.5;

      // no error, and can excuate
      intValue += 0.5;

      REGRESSION : Last worked in version 8u261


      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              sswsharm swati sharma
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: