[OT] The Usual Arithmetic Confusions

Adam D Ruppe destructionator at gmail.com
Fri Feb 4 13:18:56 UTC 2022


On Friday, 4 February 2022 at 09:45:31 UTC, Paulo Pinto wrote:
> One of the little experiments I tried was asking people about 
> the rules for unsigned arithmetic in C.

2's complement is just one part of C's rules. The 2's complement 
part is relatively easy, but knowing what is promoted to what in 
C is a bit more involved and easy to get wrong.

(and what C does doesn't make a whole lot of sense.)


More information about the Digitalmars-d mailing list