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

Rational(1, typemin(Int)) comparisons with 0 and 1 deny transitiveness of < #32569

Closed
KlausC opened this issue Jul 12, 2019 · 0 comments · Fixed by #32572
Closed

Rational(1, typemin(Int)) comparisons with 0 and 1 deny transitiveness of < #32569

KlausC opened this issue Jul 12, 2019 · 0 comments · Fixed by #32572
Labels
domain:rationals The Rational type and values thereof kind:bug Indicates an unexpected problem or unintended behavior

Comments

@KlausC
Copy link
Contributor

KlausC commented Jul 12, 2019

Maybe that should be solved. It is related to #15225, probably.
Transitivity of < should be maintained also by Rational{Int}.

julia> 1 // typemin(Int)
-1//-9223372036854775808
julia> 1 // typemin(Int) < 0
true
julia> 1 // typemin(Int) < 1
false

I propose to throw ArgumentError when typemin(T) is going to become denominator for all bits types T.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:rationals The Rational type and values thereof kind:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants