News for hackers. Stuff that matters.
Re:Fast midpoint between two integers without overflow by DerekL on Wednesday December 07, 2022 @07:25PM (#33902421)
> If you have in16 + int16, being assigned, returned or passed to a int32 type, then the calculation can be done in int32.

By the way, if int has 16 bits (which is rare nowadays), then the calculation will happen in 16 bits. If int has more than 16 bits, then both operands will be promoted to that size before the operation.

There are no comments on this comment yet.