title: Ideal method of multiplying mixed fractional number to prevent overflow?
body: <p>I have a simple class that contains three <strong>unsigned</strong> integer fields: a whole value, a numerator, and a denominator, representing a mixed number of the form:</p>
  
  <pre><code>&lt;Whole&gt; &lt;Num&gt;/&lt;Den&gt;  // e.g. 3 1/2
  </code></pre>
  
  <p>I'd like to be able to multiply instances of these classes with each other, but since my main app uses relatively large numbers, I'm concerned about overflow. Is there an algorithm for performing this kind of multiplication that minimizes the potential for multiplication overflow?</p>
  
  <p>I'm OK with having overflow if it's unavoidable, what I'm looking for is for a way to "intelligently" multiply to avoid having overflow if it's possible.</p>