# Math.ceil acting weird

**URL:** <https://forum.kirupa.com/t/math-ceil-acting-weird/312872>\
**Category:** Uncategorized\
**Created:** [August 14, 2010, 6:56pm UTC](https://forum.kirupa.com/t/math-ceil-acting-weird/312872 "2010-08-14T18:56:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![McLucky](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@McLucky](https://forum.kirupa.com/u/McLucky)\
**Post date:** [August 14, 2010, 6:56pm UTC](https://forum.kirupa.com/t/math-ceil-acting-weird/312872/1 "2010-08-14T18:56:26Z")

</div>

Ok, so I use math.ceil somewhere in a function. Today I noticed a bug and I isolated the culprit :  
\*\*Math.ceil(numToFormat \* 100)

\*\*I found the problem and a workaround for this already but I’m stil curious to why this happens.  
Try the following code:

```auto
var numToFormat:Number = 2.49;

trace(numToFormat);
trace(numToFormat * 100);
trace(Math.ceil(numToFormat * 100));

```

The result you will see in the output is

```auto
2.49
249.00000000000003
250

```

Why does flash think that 2.49 multiplied by 100 is 249.00000000000003 ?
