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
9223372036854775807-9223372036854775807
-92233720368547758089.2233720368548E+18
Python
Java
C



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