Integer Addition

by Steve O'Hara

In Mathematics, if you add a positive number Y to X, then X+Y is always greater than X.

In Computers, this is not always the case. Here is an example. See if you can find the problem. The answer is hidden below.


Javascript
PHP
XX+10
123456789123456799
92233720368547758079.2233720368548E+18
-9223372036854775808-9223372036854775798
Python
Java
C



Last Updated on 8/22/2020
Email: steven.ohara@utsa.edu