Two Wrongs

(don't make a right)

Calculator in Spotlight Not Doing Simple Arithmetic?

by ~kqr

I've always enjoyed one particular little feature of Mac OS X more than others: the Spotlight dropdown you can get by pressing the magnifying glass in the upper-right, or pressing cmd+Space. Granted, I mostly use it to launch programs, but it can also act like a calculator, which is a nice touch.

screenshot of Spotlight in OS X Mavericks

However, I started having problems with it in OS X Mavericks, which was for me a new version. For some reason, it wouldn't even do simple arithmetic like 3.6 / 12. Had the calculator in Spotlight stopped working? I did some quick Google searches, but nothing relevant jumped at me. What was extra weird was that only some calculations didn't work. Others did.

After an embarrassingly long session of troubleshooting, I figured out the problem: The calculator in Spotlight respects localisation, which in my case means it will refuse to calculate 3.6 / 12, but it will happily tell me that 3,6 / 12 = 0,3. It is so because at some point someone decided that in Sweden, we use the comma symbol as our radix point.*

  1. * Which I've now learned is actually more common by number of countries using it. Less common if you consider the number of inhabitants in said countries. NuclearVacuum at Wikipedia has provided the helpful illusration below (which you can click to magnify).

    Map of countries coloured by radix point

    Green countries use comma as their radix point, blue countries use a dot. Red countries use another character which resembles the comma a lot. Funny how there's a very strong correlation between blue countries in this map and former British colonies...

If you enjoyed this article, you might like others tagged with