Flash does math wrong, or, I do... you decide

I have these dials. I want to add 0.1 to the “dial value” when you press it. I have the results of this value spit out to a dynamic text box.

My problem is: Right at “6” (so, it just said 5.9), it shows me 5.999999999 ! Flash is subtracting, what, billionths? from my numbers!

To remedy this problem I throw this line in there:

_root.dial.value = (Math.round(_root.dial.value*10.0))/10.0;

This seems to work, but why is flash doing math wrong?

Can flash not add the entire “0.1” before it jumps to the next frame? How would you old wise men sove this problem?

http://www.macromedia.com/support/flash/ts/documents/roundoff_error.htm :-\

NOOOOO! I thought I had searched everywhere! Thanks kax.

I love the solution “this is a fact of life” Ahaha, that’s gold.

If I want to do precise math, do you have any suggestions?

don’t thank me… i got the link from senocular (Flash Limits). :wink:

and no, i don’t have any suggestions… sorry. :frowning: