Why don't you use while(position > some small value) ?!
When you are programming you will always have to deal with inaccuracies, they result from the implementation and limitation of numbers on computers.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends