Shrink integers toward zero instead of typemin #63
jariji
started this conversation in
Design & Ideas
Replies: 1 comment
-
Yes, this is definitely a nice to have. The code currently responsible for producing integers is the same for signed & unsigned types, located here. This would need to be specialized for signed integers, such that the encoding for negative numbers is considered strictly larger than the encoding for positive numbers. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It seems that integers currently shrink toward
typemin(Int)
:I have trouble reading these many-digit numbers, so it's hard to tell if an assertion like
-9223372036854775808 < -9223372036854775808
is correct or not. I think I would have an easier time making sense of the errors if they shrank toward zero instead so that the assertions were more like0 < 1
.Beta Was this translation helpful? Give feedback.
All reactions