Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C language? Symbol shaping a and b, how to judge whether a+b overflows?
C language? Symbol shaping a and b, how to judge whether a+b overflows?
Simple, you will understand as soon as I say it.

If one is positive and the other is negative.

Addition will definitely not overflow.

If so

2 Zheng

Then we take the overflow threshold (2 3 1- 1).

negative

a

Then compare it with B.

if

B is big, then a+b will overflow.

If it's negative 2, you should know it, right?