What is the best way to calculate log without a calculator?

This is a method I found a year ago. This method takes a lot of time but it will give an accurate answer.
To calculate log(25):
1) Divide 25 by the nearest power of 10. The condition must be 25 ≥ 10n.
2) The value of n is 1 because 25 ≥ 101. So the initial answer is 1.xxxxxx.
3) Divide 25 by 101. The result is 2.5.
4) Raise 2.5 by 10. So 2.510 ≈ 9536.7
(Note: The number is raised to 10 because we are already looking for the digits after the decimal point.)
5) For the next values, the same process will be used.
6) Divide 9536.7 by the nearest power of 10.
7) 9536.7 ≥ 103 so n=3. The answer is now 1.3xxxxx.
8) 9536.7 / 103 = 9.5367
9) Raise 9.5367 to 10. 9.536710 = 6222733625
10) 6222733625 ≥ 10n so n=9. The answer is now 1.39xxxx.
11) Repeat the same process until you get the desired precision.
12) So log (25) ≈ 1.39794.

This also works on logs with bases other than 10, even with decimals. In solving loga(x), just replace 10n with an. Also in solving for n, simply just divide the number by the base repeatedly until you get a quotient nearest to 1. The number of times you divided is n. (ie. 250/10= 25 (1), 25/10=2.5 (2), so n=2)

This is a method I had formulated on my own so I'm not saying that this is 100% reliable. It would be better to check your answer with a calculator. But I've tried this many times without flaws. No log tables, no need to memorize, just pure math.


Calculating them to high precision is tedious, which is why the tables were once so important. The tables relied on interpolation formulae and inevitably contained errors, carried from book to book as a result of silent copying, sometimes for 200 years or more; errors in Vlacq and de Decker's table (1627) were still turning up in tables in the 19th century. This was one of Babbage's motivations for trying to construct a general purpose computer. Luckily, estimating a logarithm reliably to three or four decimal places isn't too hard if you are willing to memorize a handful of values and a simple formula.

Memorize $\log_{10}2,3,5,7$ and $\tfrac1{\ln10}\approx0.4343$.

(Note that $\log_{10}5=1-\log_{10}2$.) Then use $$\ln x\approx2\cdot\tfrac{x-1}{x+1}\text{ for }x\approx1$$ So for example $\log_{10}17=\log_{10}(2^4\cdot\tfrac{17}{16})=4\log_{10}2+\tfrac1{\ln10}\cdot\ln\tfrac{17}{16}$

And that's about $4\cdot0.30103+0.4343\cdot2\cdot\tfrac1{33}=1.23044\overline{12}$. True value: $1.2304489...$

Similarly $\log_{10}22=\log_{10}(3\cdot 7\cdot \tfrac{22}{21})=\log_{10}3+\log_{10}7+\tfrac1{\ln 10}\cdot\ln\tfrac{22}{21}$

Approximately $0.477121+0.845098+0.4343\cdot2\cdot\tfrac1{43}=1.342419$. True value: $1.34242268...$

Something like $\log_{10}3.57$ can be calculated as $-2+\log_{10}357$ which you can expand as $=-2+\log_{10}3+\log_{10}7+\log_{10}17\approx 0.55266$. True value: $0.5526682...$ In general the level of accuracy depends on how far you want to go in memorizing the logarithms of prime numbers.


In case anybody wondered why the algorithm given by Ezui actually works, here is a little algebra to explain why:

The algorithm states, that to find the base $10$ logarithm of $x$ one should repeatedly carry out the following three steps:

  1. $d=\max(n\mid 10^n\leq x)$, store $d$ as the next digit
  2. $y=x/10^d$
  3. $x=y^{10}$

To prove the correctness, it suffices to prove that each "round" is correct. For simplicity, let $\log$ denote the base $10$ logarithm. First note that $d=\lfloor\log(x)\rfloor\in[0,\infty)\cap\mathbb Z$ is the integer part of $\log(x)$ and then $$ \begin{align} \log(y)&=\log(x/10^d)\\ &=\log(x)-d\in[0,1) \end{align} $$ where $\log(y)$ must be the fractional part of $\log(x)$. Thus we have $\log(x)=d+\log(y)$. Now, $\log(y^{10})=10\log(y)\in[0,10)$, so if determine $\log(y^{10})$ this result may be used to compute $\log(x)=d+\log(y^{10})/10$. The first digit of $\log(y^{10})$ is found in step 1. in the next "round" of the algorithm where $x=y^{10}$. So the algorithm is correct and produces a new digit of $\log(x)$ in each step.


For calculating $\log_b(x)$, the algorithm should be:

  1. $d=\max(n\mid b^n\leq x)$, store $d$ as the next digit
  2. $y=x/b^d$
  3. $x=y^b$

Tags:

Logarithms