# parseFloat problem with decimals

**URL:** <https://forum.kirupa.com/t/parsefloat-problem-with-decimals/247879>\
**Category:** flash\
**Created:** [December 31, 2007, 6:12pm UTC](https://forum.kirupa.com/t/parsefloat-problem-with-decimals/247879 "2007-12-31T18:12:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![540media](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/540media/32/2543_2.png) [@540media](https://forum.kirupa.com/u/540media)\
**Post date:** [December 31, 2007, 6:12pm UTC](https://forum.kirupa.com/t/parsefloat-problem-with-decimals/247879/1 "2007-12-31T18:12:02Z")

</div>

can someone have a look and see if they can help me out with this problem??

I’m creating a math test where the user multiples a decimal with a whole number, the numbers are being created at random.

the problem I am having is that I’m using a function so that if the decimal is a whole number itself flash adds a .0 on the end, this all works fine… but sometimes when you click the check answer button, and answer is correct, it shows as being incorrect.

I’ve attach a file so you can see what I mean (the error doesnt always show straight away)… I’ve tried so many different ways but cant get this thing to work.

if someone can help my out they would be a life saver :ne:
