# \[F8\] Shorten Numbers

**URL:** <https://forum.kirupa.com/t/f8-shorten-numbers/193818>\
**Category:** flash\
**Created:** [July 18, 2006, 5:11pm UTC](https://forum.kirupa.com/t/f8-shorten-numbers/193818 "2006-07-18T17:11:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Random\_Hero](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@Random\_Hero](https://forum.kirupa.com/u/Random_Hero)\
**Post date:** [July 18, 2006, 5:11pm UTC](https://forum.kirupa.com/t/f8-shorten-numbers/193818/1 "2006-07-18T17:11:19Z")

</div>

Hey guys, I’m trying to figure out how to trunticate a given value by another value. Here’s a visual description:

Start Value: 3,000,000  
Div Value: 1,000,000  
End Value Wanted: 3

So, I started by using length(Var)-1 to find out how many zeros it needed to lop off, then multiplied it by -1, and then attempted to use Math.pow() to set the Start Value to the right amount of places, but it ends up giving me a strange result.

How would one state this?

3,000,000 \* 10^-6

I assumed it was this:

3,000,000 \* Math.pow(10, -6)

And got this:

1e-6???

Thanks for any help you might be able to provide, and I’m up for alternate solutions as well, but this Math.pow’s bugging me!
