JuliaLang/julia — pull request #3382 by GunnarFarneback (2013-06-13 17:54:07+00:00)
Title: Avoid some rational overflow

This change avoids overflow for rational +, -, rem, mod in certain situations where the denominators are large but have significant common divisors. An important special case is when both rationals have the same denominator.

The same technique is also applied to integer lcm.