You're safe to use floats probably.
But either way if you're using floats or doubles...
usually you shouldn't compare to a specific value (ie: if(velocity==0.f)), instead you should use some epsilon value depending on the context, because it's not fixed-point, maybe if you're handling houndreds, epsilon could be 0.1f, but if you're handling microns, it should be 0.0000001.
You should know that floats have 6 digit significant value.
1000000.f + 1.f = 1000000.f
:shock:
Sometimes deceleration doesn't affect velocity, and the object can keep moving. It's almost never noticeable on the position, but rather as the animation continues to walk instead of standing still.
So, my recomendation, check for real numbers with an inequation like
if(-EPSILON <= velocity && velocity <=EPSILON) { stop(); }