Electronic Engineering Blog

Calculator in Apple’s OS X El Capitan cannot perform basic maths!

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!

Screen Shot 2016-02-03 at 10.29.36

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)

Screen Shot 2016-02-03 at 10.32.49

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.

Screen Shot 2016-02-03 at 10.36.02

And just for fun, the same thing in Windows 10’s new calculator app..
Oh look, it gets it right!

Screenshot 2016-02-03 10.38.59

For the above tests, the most recent publicly available released version of OS X El Capitan 10.11.3 was used.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.