Weird offset gets added when moving forward

I have not checked the implementation of those functions, but do you know that floats has limited precision? You can't make perfect calculations with floats. There will always be an error, and doing calculations repeatedly might increase the error.