Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid some rational overflow #3382

Merged
merged 1 commit into from
Jun 13, 2013

Conversation

GunnarFarneback
Copy link
Contributor

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.

@StefanKarpinski
Copy link
Member

Thanks. This is a good change to come out of the Rational/Float promotion experiment in any case.

StefanKarpinski added a commit that referenced this pull request Jun 13, 2013
@StefanKarpinski StefanKarpinski merged commit 23ee2ea into JuliaLang:master Jun 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants