Hi Everyone -

Given the following code:
        var num1:Number = 0.72;
        var num2:Number = 0.198;
        var num3:Number;
                        
        num3 = num1;
        num3 += num2;

I would expect num3 to equal 0.918.

Instead, it equals 0.9179999999999999.

And when I apply a number formatter with a precision of 2, I get 0.91.

I am performing financial calculations, and this is not acceptable.

Am I doing something wrong here?

Thanks for your help!
Ken


Reply via email to