# Floating point hell

**URL:** https://forum.kirupa.com/t/floating-point-hell/289865
**Category:** Uncategorized
**Created:** [June 5, 2009, 8:15pm UTC](https://forum.kirupa.com/t/floating-point-hell/289865 "2009-06-05T20:15:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tedc](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@tedc](https://forum.kirupa.com/u/tedc)
#### Post date: [June 5, 2009, 8:15pm UTC](https://forum.kirupa.com/t/floating-point-hell/289865/1 "2009-06-05T20:15:04Z")

</div>

First of all, what is up with this?

```auto
trace(19.99 * 100); // 1998.9999999999998

```

Second of all, how would I go about turning 1.52999 into 1.52 instead of 1.53?? I would just like to pop off everything after two decimals but toFixed(2) would round up my example to 1.53… Any ideas? Someone been here before?

Thanks!
