Integer overflow: Difference between revisions

add RPL
(add RPL)
Line 2,424:
-1.00000000E+9 [underflow]
-1.50000000E+9 [underflow]
</pre>
 
=={{header|RPL}}==
RPL can handle unsigned integers, whose size can be set by the user from 2 to 64 bits. This format is provided to help software engineers in low-level programming of a ‘real’ computer, not to speed up calculations: RPL programs go faster when using floating-point numbers.
Let’s work with 64-bit integers, displayed in base 10:
64 STWS DEC
and let’s try to comply with the task:
# -18446744073709551615
is rejected by the command line interpreter (syntax error).
#10000000000000000000 #10000000000000000000 +
#9223372036854775807 #18446744073709551615 -
#4294967296 #4294967296 *
{{out}}
<pre>
3: # 9223372036854775807d
2: # 0d
1: # 0d
</pre>
 
1,151

edits