Animated Objects drifting towards origin - suspect loss of precision issue

Hi,

I’m working on a physics program with 2 bodies orbiting around each other using basic newtonian mechanics.

My problem is I notice my objects are drifting towards the origin.

In my codes I run my equations and then I add a value to the x and y of the objects to move them.

like so:


Some code using x and y to calculate new xvelocities
...

x+=xVelocity;
y+=yVelocity;
trace(x.toFixed(8));

What i notice about the x & y value of my objects is that when i trace them they have only 2 decimal place precision. Why is this? This may be the cause of my issue but im not sure. Has anybody encountered anything similar before?

Trace Output
200.15000000
195.50000000
200.20000000
200.20000000
192.50000000
200.20000000