if (!isFinite(numerator/denominator)) puts("result is infinity or not a number");