catch divide-by-zero for rationals