# Simple Subtraction

**URL:** https://forum.kirupa.com/t/simple-subtraction/174825
**Category:** flash
**Created:** [January 9, 2006, 5:20pm UTC](https://forum.kirupa.com/t/simple-subtraction/174825 "2006-01-09T17:20:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ryguyspk](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@ryguyspk](https://forum.kirupa.com/u/ryguyspk)
#### Post date: [January 9, 2006, 5:20pm UTC](https://forum.kirupa.com/t/simple-subtraction/174825/1 "2006-01-09T17:20:17Z")

</div>

Not sure if Flash is acting weird or it must be me.

Everything has been working fine and I just ran into a problem with some subtraction.

```php
var total:Number = 161.40 - 150.00 - 11.40
trace (total)

```

This should equal to 0, however Flash is outputting: 5.32907051820075e-15

I’ve tried using Math.round, abs, ceil, floor. However, it doesn’t give accurate results when more numbers are added into my array.

161.40 is a grand total, 150.00 is an item’s base price, and 11.40 is the shipping cost.

Any advice? I’ve looked into Number.MIN/MAX but still no go.
