1

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.

  • 2
    I wish there could be a way to map some abbreviations to the Programmer's mode of the Calculator.app (I guess that is beyond lazy) – phwd Mar 8 '11 at 21:19
4

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.

| 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) – mmmmmm 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .