Hacker News new | ask | show | jobs
by BinRoo 461 days ago
One of my favorite tricks in elementary school was to convince people I can calculate any logarithm for any number of their choosing.

> Me: Pick any number.

> Friend: Ok, 149,135,151

> Me: The log is 8.2

Of course I'm simply counting the number of digits, using 10 as the base, and guessing the last decimal point, but it certainly impressed everyone.

2 comments

You can do even better if you memorize three numbers: 301, 477, 845. These are the values of 1000log10(n) for n = 2, 3, 7. From these you can quickly get the values for 4 (= 22), 5 (=10/2), 6 (=23), 8 (=222) and 9 (=33).

For your example 1.49 is close to 3 / 2 so the log will be very close 0.477 - 0.301 = 0.176.

This means that your answer is near 8.176 (actual value is 8.173).

This tiny table of logs can also let you answer parlor trick questions like what is the first digit of 2^1000 (the result is very nearly 10^301 but a bit above, so 1 is the leading digit).

> 149,135,151

This is 8-point-something as you say.

1.49 is in between 1.2 and 1.6 and I have memorised log(1.2)=0.1 and log(1.6)=0.2, so I would think log(1.5) is close to 0.17, using sloppy linear interpolation.

That would make log(149,135,151) approximately 8.17. My calculator also says 8.17. Your guess was good!

I have found linear interpolation such an intuitive approximation method that the tradeoff of having to memorise more logarithms is worth it.