Fixed handling of Infinity and the sign of the quotient