     let (res, overflow3) = Rational.rationalWithOverflow(numer, denom)
     return (res, overflow1 || overflow2 || overflow3)
   }
-  
+
   /// Subtract `rhs` from `lhs` and return a tuple consisting of the result and a boolean which
   /// indicates whether there was an overflow.
   public static func subtractWithOverflow(_ lhs: Rational<T>, _ rhs: Rational<T>)

    let (n1, n2, _) = self.commonDenomWith(rhs)
    return n1 == n2 ? 0 : (n1 < n2 ? -1 : 1)
  }
  
  /// Returns the sum of this rational value and `rhs`.
  public func plus(_ rhs: Rational<T>) -> Rational<T> {
    let (n1, n2, denom) = self.commonDenomWith(rhs)
    return Rational(n1 + n2, denom)
  }
  
  /// Returns the difference between this rational value and `rhs`.
  public func minus(_ rhs: Rational<T>) -> Rational<T> {
    let (n1, n2, denom) = self.commonDenomWith(rhs)
    return Rational(n1 - n2, denom)
  }
  
  /// Multiplies this rational value with `rhs` and returns the result.
  public func times(_ rhs: Rational<T>) -> Rational<T> {
    return Rational(self.numerator * rhs.numerator, self.denominator * rhs.denominator)
  }
  
  /// Divides this rational value by `rhs` and returns the result.
  public func divided(by rhs: Rational<T>) -> Rational<T> {
    return Rational(self.numerator * rhs.denominator, self.denominator * rhs.numerator)

  
  /// Raises this rational value to the power of `exp`.
  public func toPower(of exp: T) -> Rational<T> {
    if (exp < 0) {
        return Rational(pow(denominator, -exp), pow(numerator, -exp))
    } else {
        return Rational(pow(numerator, exp), pow(denominator, exp))
    }
  }

  /// Returns the greatest common denominator for the two given rational numbers
  public static func gcd(_ x: Rational<T>, _ y: Rational<T>) -> Rational<T> {
    return Rational(Rational.gcd(x.numerator, y.numerator),
                    Rational.lcm(x.denominator, y.denominator))
  }

  /// Returns the least common multiplier for the two given rational numbers
  public static func lcm(_ x: Rational<T>, _ y: Rational<T>) -> Rational<T> {
    let (xn, yn, denom) = x.commonDenomWith(y)
