-
-
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
reverse of an unsigned range does not work as expected #29576
Labels
bug
Indicates an unexpected problem or unintended behavior
Comments
Hah, nice bug. |
StefanKarpinski
added
the
bug
Indicates an unexpected problem or unintended behavior
label
Oct 9, 2018
vtjnash
added a commit
that referenced
this issue
Nov 11, 2021
Fixes #29576 Co-authored-by: Jameson Nash <[email protected]>
vtjnash
added a commit
that referenced
this issue
Nov 12, 2021
Fixes #29576 Co-authored-by: Jameson Nash <[email protected]> Co-authored-by: Lilith Orion Hafner <[email protected]>
oscardssmith
pushed a commit
that referenced
this issue
Jan 6, 2022
Fixes #29576 Co-authored-by: Jameson Nash <[email protected]> Co-authored-by: Lilith Orion Hafner <[email protected]>
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this issue
Feb 22, 2022
Fixes JuliaLang#29576 Co-authored-by: Jameson Nash <[email protected]> Co-authored-by: Lilith Orion Hafner <[email protected]>
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this issue
Mar 8, 2022
Fixes JuliaLang#29576 Co-authored-by: Jameson Nash <[email protected]> Co-authored-by: Lilith Orion Hafner <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you reverse a range of unsigned integers, then you get an empty range:
Maybe this is intentional but it is not what one (I) would expect.
The problem seems to be that by reversing we get a
StepRange
and apparently there is a check for an overflow here, so the values never get wrapped around through 2-complement.
versioninfo:
The text was updated successfully, but these errors were encountered: