News for hackers. Stuff that matters.
Re:Signed Integers Are Two’s Complement by jwilk on Thursday May 31, 2018 @03:23AM (#17194578)
The main change between [P0907r0] and the subsequent revision is to maintain undefined behavior when signed integer overflow occurs, instead of defining wrapping behavior.
Re:Signed Integers Are Two’s Complement by badsectoracula on Thursday May 31, 2018 @06:04AM (#17195180)
Gah, what is the point then?
Re:Signed Integers Are Two’s Complement by sanxiyn on Thursday May 31, 2018 @06:24AM (#17195247)
The point is that signed integers are two's complement. After all, it is the title.
Re:Signed Integers Are Two’s Complement by barrkel on Thursday May 31, 2018 @08:13AM (#17195706)
Naive overflow checks are often done by adding two positive numbers together and checking if the result is negative. If wrapping is undefined, this no longer works, and the overflow check may be eliminated.
Re:Signed Integers Are Two’s Complement by slededit on Thursday May 31, 2018 @05:14AM (#17195010)
And the joy I originally had is once again lost.