Negative Numbers

by Steve O'Hara

In Mathematics, if you have a number X, then --X is always the same as 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
X-X
123456789-123456789
2147483647-2147483647
-21474836482147483648
Python
Java



Last Updated on 9/28/2016
Email: steve@oharasteve.com