4 Replies Latest reply on Nov 30, 2006 10:27 AM by kglad

    Simple arithmatic function is not resulting in zero

    maija_g
      This is absolutely bizarre. 2.4 - 1.2 = 1.2 and 1.2-1.2 = 0, or so you'd think, except that Flash keeps telling me 1.2 - 1.2 = -4.44089209850063e-16. Subtract 1.2 once more from -4.44089209850063e-16 and you miraculously get -1.2. Even more bizarre is that this only happens if the starting value is greater than 2.4.

      See attached code which began as something much more complex but I've commented out absolutely EVERYTHING except for this little bit of math and yet it keeps telling me that 0 is -4.44089209850063e-16. But only if rpm is greater than 2.4 to start with. If it's 2.4 or less, it does get to zero.

      Thanks for any help.