# Weird trouble dealing with float numbers in coordinates

**URL:** <https://forum.kirupa.com/t/weird-trouble-dealing-with-float-numbers-in-coordinates/281805>\
**Category:** flash\
**Created:** [February 13, 2009, 11:29am UTC](https://forum.kirupa.com/t/weird-trouble-dealing-with-float-numbers-in-coordinates/281805 "2009-02-13T11:29:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![awflasher](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/awflasher/32/3562_2.png) [@awflasher](https://forum.kirupa.com/u/awflasher)\
**Post date:** [February 13, 2009, 11:29am UTC](https://forum.kirupa.com/t/weird-trouble-dealing-with-float-numbers-in-coordinates/281805/1 "2009-02-13T11:29:14Z")

</div>

In this case, I want it to add a vx to a sprite’s x each time to make a motion.

at first, the x value of the sprite is 254, the vx is very small, only 0.01

As there might be some trouble when dealing with float numbers, I try to “zoom” the value of vx to a bigger one by multiplies 10000

everything seems working fine except I cannot pass the new result to my x value of the sprite:

```auto
dx = someSprite.x*10000;
trace("x: "+someSprite.x+",dx: "+dx+",vx: "+someSprite.vx*10000);

dx += someSprite.vx*10000;
dx = dx/10000;
trace("x: "+someSprite.x+",dx: "+dx+",vx: "+someSprite.vx*10000);

someSprite.x = dx; [COLOR=Red]// passing 254.01 to someSprite.x, but it was not working!![/COLOR]
trace("x: "+someSprite.x+",dx: "+dx+",vx: "+someSprite.vx*10000);

```

Output:

```auto
x: 254,dx: 2540000,vx: 100
x: 254,dx: 254.01,vx: 100
x: 254,dx: 254.01,vx: 100

```
