The reason this "works" is that with a=b, a-b = 0, and division by zero does not make sense. When you divide out (a-b), you are dividing by zero.