     }
 
     static func % (lhs: Rational, rhs: Rational) -> Rational {
-        guard lhs.isFinite() && rhs.isFinite() else {
+        if lhs.isInfinite || rhs.isInfinite {
             return Rational(lhs.numerator % rhs.numerator, 0);
         }
 

    
    /// Is the Rational finite?
    /// Returns: False if the denominator is 0, True otherwise
    func isFinite() -> Bool {
        return denominator != 0;
    }
    
    /// Is the Rational infinite?
    /// Returns: True if the denominator is 0, False otherwise
    func isInfinite() -> Bool {
        return numerator != 0 && denominator == 0;
    }
    
    /// Is the Rational not a number?
    /// Returns: True if the numerator and denominator are 0, False otherwise
    func isNaN() -> Bool {
        return numerator == 0 && denominator == 0;
    }
}

    }
    
    static func subtractWithOverflow(_ lhs: Rational, _ rhs: Rational) -> (Rational, overflow: Bool) {
        if lhs.isInfinite || rhs.isInfinite {
            return (Rational(lhs.numerator - rhs.numerator, 0), false);
        }

