Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a combination of math functions I could use in spotlight to accomplish change of base ? I know I can do it on a case by case basis with normal algebra.

share|improve this question
I wish there could be a way to map some abbreviations to the Programmer's mode of the (I guess that is beyond lazy) – phwd Mar 8 '11 at 21:19

The algebraic way to do it is logbx=logax/logab. In spotlight, the log(x) function is log10x and the ln(x) function is logex. So taking logbx would be log(x)/log(b). However, rounding is significant enough to have the answer off even if it should be a whole number. For example, I tested log(4)/log(2) and got 1.9999999997 when it should be exactly 2.

share|improve this answer
As it is a floating point calculation the result won't be exactly 2. There will always be errors. (Although that error is more than I would expect I would expect accuracy to 14-15 significant figures) – Mark Mar 8 '11 at 21:01
@Mark Yes, I expected it to be more precise too, that is why I added that example. The calculator application is precise enough that it returns 2. – ughoavgfhw Mar 8 '11 at 22:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.