# Flash actionscript 2 bug? is there a solution to this?

**URL:** <https://forum.kirupa.com/t/flash-actionscript-2-bug-is-there-a-solution-to-this/238866>\
**Category:** Uncategorized\
**Created:** [September 16, 2007, 2:31pm UTC](https://forum.kirupa.com/t/flash-actionscript-2-bug-is-there-a-solution-to-this/238866 "2007-09-16T14:31:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nyttx](https://avatars.discourse-cdn.com/v4/letter/n/ed655f/32.png) [@nyttx](https://forum.kirupa.com/u/nyttx)\
**Post date:** [September 16, 2007, 2:31pm UTC](https://forum.kirupa.com/t/flash-actionscript-2-bug-is-there-a-solution-to-this/238866/1 "2007-09-16T14:31:56Z")

</div>

hi there

been working with actionscript for a while, and got this very strange issue with adding numbers. Checkout this simple code:

```auto
 
var x:Number = 0;
var y:Number = 2.05;
for(var i=0;i<50;i++) {
 x+=y;
 trace(x);
}

```

and the output below:

2.05  
4.1  
6.15  
8.2  
10.25  
12.3  
14.35  
16.4  
18.45  
20.5  
22.55  
24.6  
26.65  
28.7  
30.75  
32.8  
34.85  
36.9  
38.95  
41  
43.05  
45.1  
47.15  
49.2  
51.25  
53.3  
55.35  
57.4  
59.45  
61.5  
63.55  
65.6  
67.65  
69.7  
71.75  
73.8  
75.85  
77.8999999999999  
79.9499999999999  
81.9999999999999  
84.0499999999999  
86.0999999999999  
88.1499999999999  
90.1999999999999  
92.2499999999999  
94.2999999999999  
96.3499999999999  
98.3999999999999  
100.45  
102.5

this is giving me a serious headache! How is this possible? where do this 99999 values come from? Has anyone encounter this?

thanks in advance
