Bug in multiplication in AS3 (CS5) ?
Hi,
When I try to multiply certain numbers, I get some weird results.
I cannot imagine that a simple multiplication would contain bugs, but it appears to be so...
Could someone please verify the following ?
Make a new AS3 flash project, and in the first frame, just paste the following code :
/////////////////////////////////////////////////////////////////////
import flash.text.TextField
var a:Number = 19.8;
var b:Number = 9;
var result:Number = a * b;
var v_TextField = new TextField();
v_TextField.autoSize = TextFieldAutoSize.LEFT;
v_TextField.wordWrap = false;
v_TextField.text = "Test : " + a + "*" + b + "=" + result;
addChild(v_TextField);
/////////////////////////////////////////////////////////////////////
If I publish and run this, I get :
Test : 19.8*9=178.20000000000002
The same behaviour with 19.8*18
I didn't look for other combinations yet.
What's up with this ?