0 Replies Latest reply on Sep 5, 2006 2:42 PM by DoomGoober

    0.7 + 0.2 + 0.1 NOT EQUAL 1.0

    DoomGoober
      I know there is some inherent inaccuracy around floating point, but this is absurd. According to Flash 0.7 + 0.2 + 0.1 is less than 1.0.

      if ((0.7 + 0.2 + 0.1) == 1.0)
      {
      trace("Equal!");
      }
      else if ((0.7 + 0.2 + 0.1) < 1.0)
      {
      trace("Less than"); //Incorrectly prints out "Less than".
      }

      trace (0.7 + 0.2 + 0.1); //Correctly prints out 1

      This seems like a bug more than a floating point inaccuracy.