Calculating logarithms by hand

12 posts / 0 new
Last post
#1 8 September, 2017 - 07:05
Offline
Joined: 5 years 11 months ago

Calculating logarithms by hand


Just for fun, let's calculate all logarithms from scratch.
And let's start with the logarithm of 2.

I start with doubling 2 a couple of times:
2
4
8
16
32
64
128
256
512
1024

Now, 1024 is a number we can easily guess the logarithm from => a little over 3.

In other words,
\(2^{10} = 1024\) =>
\(log(2^{10}) = log(1024) \) =>
\(10*log(2) = log(1024) = 3 + log(1.024) \) =>
\(log(2) = 0.3 + log(1.024)/10 \)

So the difficult part now is log(1.024).

Let's use Pascals triangle:

Using the triangle, we find that \(1.1^7 = 1.9487171\), which is almost 2.
Then \(1.01^{70}\) is also around 2.
let's use 2.

If 70 times leads to 0.3, then one time is 0.0043.

Otherwise stated:
\(1.01^{70} \approx 2 \)=>
\(log(1.01^{70}) \approx log(2) \approx 0.3 \) =>
\(70 * log(1.01) \approx 0.3 \) =>
\(log(1.01) \approx 0.3/70 \approx 0.0043 \)

\(2.4*0.0043\) is a little over \(0.01\).
(we can do this because \(1.01 ^{2.4} \approx 1.024\) )

Long story short; \(log(1.024) \approx 0.01 \)

Now we can calculate:
\(log(2) = 0.3 + log(1.024)/10 \approx 0.3 + 0.001 = 0.301\)

11 September, 2017 - 08:56
Offline
Joined: 6 years 3 months ago

Here's a few good resources for mental base 10 logarithms:

Calculating Base 10 Logarithms in your Head (TEXT): http://www.nerdparadise.com/math/base10logs

Calculating logarithms in your head (VIDEO): https://www.youtube.com/watch?v=V5rgTPu8JcE

More mental logarithm tricks (SEARCH RESULTS): https://www.reddit.com/r/mentalmath/search?q=logarithm&restrict_sr=on&so...

14 September, 2017 - 02:07
Offline
Joined: 5 years 11 months ago

Great links, Greymatters!

A little background. As a kid I always wanted to know how to calculate log 2 and nobody was able to tell me.

Thus I am planning to do a series here - with a bit more precision - and in a way that people can do the calculations themselves.

We just did the logarithm of 2.
Let's do the logarithm of 3 now.

Just like with the logarithm of 2, we can set up a sequence of numbers where each one is 3 times the previous:
3
9
27
81
243
729
2187
6561
19683

In short 3^9 = 19,683.
Can we guess the logarithm of 19,683?
Well, it is close to 20,000 and the logarithm of 20,000 is 4 + 0.301 = 4.301.

Can we do better? Well, 19,683 is 20,000 minus about 1.6%. 1.6% of 20,000 = 320 and 20,000-320 = 19680, so by using 1.6% we are pretty close.
We calculated 1% to be 0.0043, this means 1.6% must be 0.0069. (Just do 43 times 16. 4*16=64. 3*16=48. Shift decimal point, so add 64 and 4.8 to get 688. Round to 69.)

4.301 - 0.0069 = 4.2941.

Again:
\(3^9 = 19,683 \) =>
\(log(3^9) = log(19,683) \approx 4.2941 \) =>
\(9 * log(3) \approx 4.2941 \) =>
\(log(3) \approx 4.2941/9 = 0.477122...\) =>

(log 3 actually is 0.477121...)

See how close we get?

27 September, 2017 - 05:14
Offline
Joined: 5 years 11 months ago

We already calculated log 2 and log 3.
With these numbers calculated, for the numbers 1-10 we can now fill in the following numbers in three digit precision:

1 = 0
2 = 0.301
3 = 0.477
4 = 2 * log 2 = 0.602
5 = 1 - log 2 = 0.699
6 = log 2 + log 3 = 0.778
7 = ?
8 = 3 * log 2 = 0.903
9 = 2 * log 3 = 954
10 = 1

The only number left to be calculated is 7.
How do we calculate log 7?
Let's try this:
7 * 7 = 49 and 49 is close to 50 and for 50 we can easily calculate the logarithm.
Let's follow the chain.

If log 5 = 0.699, then log 50 = 1.699.
Log 49 is 2% less. If 1% is 0.0043, then 2% is 0.0086.
1.699 - 0.0086 = 1.6904.

7 = sqrt(49), so the log of 7 is 1.6904 / 2 = 0.8452.

(log 7 is actually 0.8451)

Another way is this.
5*7=35 and 35^2 = 1225, which is roughly 1200 plus 2%.
Log 1200 = log 3 + log 4 + log 100 =
0.477 + 0.602 + 2 =
3.079
Log 2% = 0.0086.
3.079 + 0.0086 =
3.0876.
1200 plus 2% is 1224. We are looking for 1225, so to account for the difference let's round 3.0876 up to 3.088.

In other words, log (35^2) = 3.088.
Then log 35 = 3.088/2 = 1.544.

Log 7 = log 35 - log 5
Log 5 = 0.699
Log 7 = 1.544 - 0.699 =
0.845

30 October, 2017 - 01:38
Offline
Joined: 5 years 11 months ago

We have calculated the following logs:

1 = 0
2 = 0.301
3 = 0.477
4 = 2 * log 2 = 0.602
5 = 1 - log 2 = 0.699
6 = log 2 + log 3 = 0.778
7 = 0.845
8 = 3 * log 2 = 0.903
9 = 2 * log 3 = 0.954
10 = 1

Next number is eleven.
How to calculate log 11? Here is a way to do this.
We can take the geometric mean of 10 and 12.

The geometric mean between 10 and 12 is sqrt(10 * 12) = sqrt(120).
However; to be precise, for log 11 we need log(sqrt(121)).
120 is close to 121 though. We need a small correction to be precise (0.833%).

log 120 = log (10*4*3) = log 10 + log 4 + log 3= 1 + 0.477 + 0.602 = 2.079

Now we add the small correction.
We calculated log (120) and we need log(121).

1/120 = 0.833... %
If the log of 1% = 0.0043, then 0.833% = 0.0043 *0.833 = 0.00358.
2.079 + 0.00358 = 2.08258.
2.08258 / 2 = 1.04129

log 11 = 1.04139

5 January, 2018 - 06:14
Offline
Joined: 1 year 4 months ago

Meh, and I just wrote a post asking about this. -_-

Thanks Kinma, I'll be going through this and seeing whether I can get this through my thick logarithm hating skull...

A question though, I keep seeing mention of "anti-logarithms", what are they and how do they relate to what you've done here?

6 January, 2018 - 14:36
Offline
Joined: 5 years 11 months ago

The anti-logarithm is just the reverse as taking the logarithm.
If log 2 = 0.301, then 10^0.301 = 2.

6 January, 2018 - 20:30
Offline
Joined: 1 year 4 months ago

So stated differently (to check my own understanding) 10^log(2) = 2 for base 10 logs... Okay, that part at least seems fairly simple... Oooh, okay I think I get it, I was starting to say that "anti-log" is a fancy way of saying "number the log came from" but it's really more of a function from log x to x with slightly crappy notation. I still need to completely wrap my head around this (may write some code to do this, that's how I usually figure out math), but I think I at least finally understand the log/anti-log thing. :) Thank you Kinma, it's the first time I managed to understand /anything/ about logarithms and it feels really nice. :) May, just maybe I can understand this too. ^_^

7 January, 2018 - 11:05
Offline
Joined: 1 year 4 months ago

Okay, so my first question. Based on what I'm doing I'm noting three things. As far as I can tell you are mixing the base 2 log and the base 10 log without mentioning where this switch came from. log_10(1000) = approx 3, log_2(1000) = 9.9657. Second I cannot get 3 + log_2(1.024) = log_2(1024) to work at all, even when switching bases (not to mention that I'm not at all certain where the "1.024" came from). Further given the number you gave (approx 0.301) (3 + log_10(1.024))/10 gets on pretty close to that actually.

If I work this out I'll post what I get, although given how confused I am right now I'd appreciate help. :P

11 January, 2018 - 07:55
Offline
Joined: 2 years 4 weeks ago

Here's an interesting way to calculate logs in your head. You need to memorize some numbers first, but that might appeal to the mental gymnasts on this forum:

http://www.nerdparadise.com/math/base10logs

I've memorized half of the numbers already. I'll memorize the numbers in the second column some other time - if I remember.

As soon as the word "approximations" is mentioned, old-fashioned engineers will automatically think of numerical methods such as Taylor Series or McLaurin Series.
https://en.wikipedia.org/wiki/Taylor_series#Natural_logarithm

The problem with these methods - if I remember correctly - Is that they converge very slowly for functions that involve logs.

Much faster convergence is given by Newton's method. Two or three iterations will give you a result that is almost as accurate as a hand calculator:
https://en.wikipedia.org/wiki/Newton%27s_method

The advantage of Newton's method is that it uses first derivatives. So functions that use logs to the base 10 will automatically convert to natural logs, which are much easier to calculate:
https://www.thestudentroom.co.uk/showthread.php?t=2246235

egency wrote:

Second I cannot get 3 + log_2(1.024) = log_2(1024) to work

I can't see that assignment anywhere in the OP.

I suspect you might be misreading the following two lines:

10∗log(2)=log(1024)=3+log(1.024)10∗log(2)=log(1024)=3+log(1.024) =>
log(2)=0.3+log(1.024)/10

Note that the first of these lines - by successive equalities - evaluates to:
10∗log(2)=3+log(1.024)

If you divide that assignment throughout by 10, you arrive at the second line:
log(2)=0.3+log(1.024)/10

@egency: as a footnote, all the logs in the OP are to the base 10. There are no natural logs anywhere - nor are they needed. I mention natural logs in this current post, but that's because Newton's method uses first derivatives. Pure mathematicians will always use natural logs, denoted by ln. Applied mathematicians (AFAIK) and engineers will almost always use logs to the base 10, denoted by log.
.

12 January, 2018 - 14:14
Offline
Joined: 5 years 11 months ago

I am not mixing bases. It might look like it though.

I am merely saying:

\(2^{10} = 1024 \)

then \(log(2^{10}) = log(1024) \)

this can de rewritten as:

\(10 * log(2) = log(1024) \approx 3\)

For the sake of simplicity I round log(1024) to 3. log(1000) = 3 and 1000 is close to 1024.

Divide by 10, we get:
\(log(2) = log(1024)/10 \approx 3/10 = 0.3\)

In short:
\(log(2) \approx 0.3\)

(all logs in this post are base 10)

12 January, 2018 - 14:52
Offline
Joined: 5 years 11 months ago

Quote:

not to mention that I'm not at all certain where the "1.024" came from

I use 1024, because it is 2^10 and also because 1024 is just more than 1000, the latter we know the log equals 3, so the log of 1024 is just a tiny bit over 3.

The rest of that post is to work out the extra 2.4%.

I do kind of the same in calculating log 3. I run the progression until I find a number that seems easy to work with. In that case a number close to 20,000.

Download our free ebook! Just click the "Sign up" button below to create an account, and we'll send you a free ebook with tips on how to get started.

Related content: