as commented above, missing test case when the denominator is 0.