Not 100% sure where this question belongs, since I'm not sure if the problem is code related or not.
I've written a program to model the solar system. I am now testing its accuracy. I've checked conservation of angular momentum, and it is perfectly conserved, as is energy - I'm using the velocity verlet algorithm. I've also plotted the path of the planets, their orbits are stable over 1000 years and are definitely circular (I'm sticking to modelling circular orbits).
The problem is that the planets aren't where they started after one orbital period. They do get back to where they started, just not at the right time. I have no idea why. And it renders a lot of my checks useless. Why might this happen? The effect is significant, about 0.2*10^11m per year. And yet after 1000 years the orbit is still circular, with roughly the same radius.