I have discovered that the Calculator app that ships with OS X El Capitan cannot do some pretty basic programmer’s maths. Being able to add and subtract in Base 10 (decimal) and Base 16 (Hexadecimal) is a pretty basic requirement of any programmer’s calculator. Developers use these number systems all day long, and the Calculator App in Mavericks does claim to be able to. Except it can’t do the most basic subtraction.
Lets start with a pretty basic example in decimal. Open the calculator app and make sure it’s in “basic” mode. (CMD+1). The try this sum:
0 – 5 = ? the answer is -5, and the calculator gets this one right!
Now, with the answer still showing press CMD+3 to take it to programmer’s mode. You should see the display change to 0xFFFFFFFFFFFB – which is correct – that’s how you show -5 in 64-Bit Hexadecimal. Good so far! (click any image for a full view)
OK, so now hit the AC button to clear everything and we’ll try again, this time starting in Programmer’s mode.
Enter the same sum again 0 – 5 = and what answer do you get? You will get 0x7FFFFFFFFFFF – which is totally wrong. It’s not even one of those “oh I see what it did” type of wrongs, it’s just plain old wrong.
And just for fun, the same thing in Windows 10’s new calculator app..
Oh look, it gets it right!
For the above tests, the most recent publicly available released version of OS X El Capitan 10.11.3 was used.