Integer overflow: Difference between revisions

Content deleted Content added
Radagast83 (talk | contribs)
No consensus on merger
Cleared up long period concerning how C language treats signed/usigned int overflow. Still not good, but better.
Line 10:
: 128 bits (maximum representable value approx. 10<sup>38</sup>)
 
Since an arithmetic operation may produce a result larger than the maximum representable value, a potential error condition may result. In the [[C (programming language)|C programming language]], for example, signed integer overflow causes [[undefined behavior]], althoughwhile arithmeticunsigned oninteger unsignedoverflow integers,causes however,the number to isbe reduced [[modular arithmetic|modulo a power of two]], meaning that unsigned integers "wrap around" on overflow.
 
<!-- Diagram that illustrates wrapping behavior of integer representation. -->