-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
rationalize
returns curious/incorrect values
#5935
Comments
related to #2960 how odd -- I was contemplating ways of improving Rational on my drive to work this morning. |
There seem to be several Type issues within the |
The rationalize function is kind of a disaster. It needs a lot of work. I'll take a crack at it soon if no one else gets there first. |
Since you'll probably get to it first, I'll add my thought here on how to improve Rational. First, make
Alternatively, we could represent type Rational{I<:Integer}
top::I
bot::I
mantissa::Int8
end And do much the same operations, but then we need to handle all of the overflow in the CPU / Julia. And we aren't able to make use of the difference between |
I think |
Seems like a much better pair of
Int128
's exists.Here's what
Sage
returns where both numerator and denominator fit inInt64
's.Here's another
rationalize
issue:The text was updated successfully, but these errors were encountered: