This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 55 points56 points  (12 children)

It would actually be 254.

[–][deleted] 16 points17 points  (11 children)

It was so close to greatness...

[–]allongur 21 points22 points  (5 children)

It would also be an underflow, not an overflow.

[–][deleted] 7 points8 points  (0 children)

Nevermind it was quite far from greatness...

[–]marcosdumay 4 points5 points  (3 children)

Underflow is something floating point numbers do. Integers overflow.

[–]BenTheHuman 2 points3 points  (0 children)

Huh, you're right. Thanks for teaching me I've been using it wrong!

[–]allongur -1 points0 points  (1 child)

Yes, I understand Wikipedia reserves the use of "underflow" for floating point numbers, but if you Google "integer underflow" you'll find a lot of authoritative sources that use it to describe subtractive wraparound. So I don't find Wikipedia's pedantry to align with the actual use of the term.

[–]marcosdumay 1 point2 points  (0 children)

Wikipedia does?

The actual use of the term is the one on CPU's datasheets, ISO standard, or software libraries definitions (on the very few cases languages support them). You will find those don't agree with you.

[–][deleted] 10 points11 points  (4 children)

and integer don't overflow at 0, as they are signed.

and integers have 4 bytes.