4 ms·
Wouldn't this still overflow when one of the values is positive, the other is negative, and their difference is sufficiently large?
by Chinjut 4y ago
Wouldn't this still overflow when one of the values is positive, the other is negative, and their difference is sufficiently large?
- ardel95 4y agoThe tweet said unsigned ints
- Chinjut 4y agoTweet? But yes, sorry, I missed that your post said positive ints. The article was about signed ints, though.
- ardel95 4y agoOh, you are right. For some reason I thought I saw unsigned in there.
- kevin_thibedeau 4y agoC promotion rules can can convert unsigned to signed and vice versa so it still matters.