Jump to content

Integer overflow: Difference between revisions

m
added whitespace, indented the tables, aligned the notes.
m (added whitespace, indented the tables, aligned the notes.)
Line 25:
 
For 32-bit signed integers:
::::: {|class="wikitable"
!Expression
!Result that does not fit into a 32-bit signed integer
Line 46:
 
For 64-bit signed integers:
::: {|class="wikitable"
!Expression
!Result that does not fit into a 64-bit signed integer
Line 67:
 
For 32-bit unsigned integers:
::::: {|class="wikitable"
!Expression
!Result that does not fit into a 32-bit unsigned integer
Line 85:
 
For 64-bit unsigned integers:
::: {|class="wikitable"
!Expression
!Result that does not fit into a 64-bit unsigned integer
Line 102:
|}
 
 
When the integer overflow does trigger an exception show how the exception is caught.
;Notes:
When the integer overflow produces some value print it.
It:* should  beWhen explicitly noted when anthe integer overflow isdoes nottrigger recognizedan andexception theshow programhow continuesthe withexception wrongis resultscaught.
:*   When the integer overflow produces some value,   print it.
This should be done for signed and unsigned integers of various sizes supported by the language.
:*   It should be explicitly noted when an integer overflow is not recognized,   the program continues with wrong results.
When a language has no fixed size integer type or when no integer overflow can occur
:*   This should be done for signed and unsigned integers of various sizes supported by the computer programming language.
for other reasons this should be noted.
:*   When a language has no fixed size integer type,   or when no integer overflow can occur for other reasons,   this should be noted.
It is okay to mention, when a language supports unlimited precision integers, but
:* &nbsp; It is okay to mention, &nbsp; when a language supports unlimited precision integers, &nbsp; but this task is NOT the place to demonstrate the <br>&nbsp; capabilities of unlimited precision integers.
<br><br>
 
Cookies help us deliver our services. By using our services, you agree to our use of cookies.