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.)
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:
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.
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%).
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.
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.
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:
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.
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:
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
I can’t see that assignment anywhere in the OP.
I suspect you might be misreading the following two lines:
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.
.
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.
In previous posts, we have calculated all numbers until 11.
12 can be found by adding log 3 to log 4.
So the next unknown number is 13.
For calculating log 13 there are a number of ways to get to an answer.
For now, let’s focus on this: 3 times 13 = 39, and 39 is 2.5% less than 40 and since we have already calculated log 4 = 0.602, we know what log40 is. If log 4 is 0.602, then log40 is 1.602.
The 2.5 % reduction to get from 40 to 39 is almost already calculated.
Remember when we calculated log2 by looking at 2^10 = 1024, we realized that log 1024 = 3.01. So if we add 2.4% to a base number, the log will increase by 0.01. Then if we subtract 2.4%, the log is -0.01. 2.5% subtraction will be a tiny bit more, so let’s take -0.011.
log40 = 1.602
39 is ’ 40 minus 2.5%', is -0.011. 1.602 - 0.011 = 1.591
13 = 39/3, so take 1.591 and subtract 0.477. 1.591 - 0.477 = 1.114.
After log 13 comes log 14, which can be calculated by adding log 2 and log 7.
log 15 = log 3 + log 5
log 16 = 4 x log 2
So the next number is 17.
One way of getting towards the log of 17 is using 3 x 17 = 51.
From the previous posts we know the log of 50.
51 is just 2% more.
So take the log of 50 = log (100/2) = 2 - 0.301 = 1.699 and add the log of 2% or log 1.02.
From the previous post we know that log 1.025 = 0.01.
For log 1.02 we can just take a linear interpolation or 2/2.5 X 0.01 = 0.008.
Log 18 can be calculated by adding log 2 and log 9.
So the next one is log 19.
We can take 3 X 19 = 57 and use 60 - 5%. However, the 5% is a bit too wide and might introduce errors in the last digit. Better to search for a number with a smaller difference.
Let’s try 19 X 19 = 361.
log 360 is easy to calculate as it breaks down into 6 X 6 X 10.
Then we are 1 off. This is less than 0.3%.
Let’s do this.
log 360 = 2 X log 6 + log 10 = 2 X 0.778 + 1 = 2.556.
Now add log(1 + 1/360) \approx 0.43/360 \approx 0.0012
Add 0.0012 to 2.556 gives 2.5572.
Now, since this is 19X19, divide 2.5572 by 2.
If the last step went too quickly, try to see it this way:
Log (19X19) = 2 X log 19 = 2.5572.
If 2 X log 19 = 2.5572 then
log 19 = 2.5572 / 2 = 1.2786.
A calculator gives log 19 = 1.27875, so - again - we are pretty close!
In the previous post we calculated log 19.
Log 20 can be calculated as log 2 plus log 20
Log 21 is log 7 plus log 3
Log 22 is log 11 plus log 2
Log 23. 23 is prime and so is the next one that needs to be calculated.
This works: 23^4 = 279,841 \approx 280,000 minus 0.06 %.
Subtract ‘log minus 0.06%’ \approx -0.0000258 (multiply 6 by 43 = 258).
However; this is too small a number when we calculate with 3 or 4 digits precision.
If Log 23^4 = 5.447, then log 23 = 5.447/4.
So all that is left to do if division by 4:
5.447/4 = 1.3617