2 Replies Latest reply on May 3, 2011 8:56 AM by GordonSmith

    Flex Simple Calculation Rounding Problem

    spacecomm

      Hi,

       

      I guess this is an internals convertion problem, but how can I get rid of it?

       

      var a:Number = 0.0003;

       

      trace("a=" + a);

       

      trace("a*10000=" + a*10000);

       

      Results in:

       

      a=0.0003

      a*10000=2.9999999999999996

       

      Looks to me like the result should be 3, and I am not really calculating PI with 100 digits after the comma?

       

      Thanks, BW.