title: Possible error while dividing doubles
body: <p>I would like to check for equality 2 fractions. I think that the method I wrote is not correct because of possible loss of accuracy. Am I right or wrong?</p>
  
  <pre><code>public boolean equals(Rational r) {
      return (double) numerator / denominator == (double) r.numerator / r.denominator;
  }
  </code></pre>