TAOCP 1.2.2 Exercise 22
Using the change-of-base formula, \lg x=\frac{\ln x}{\ln 2}, \qquad \log_{10}x=\frac{\ln x}{\ln 10}.
Section 1.2.2: Numbers, Powers, and Logarithms
Exercise 22. ▶ [20] (R. W. Hamming.) Prove that
$$\lg x \approx \ln x + \log_{10} x,$$
with less than 1% error! (Thus a table of natural logarithms and of common logarithms can be used to get approximate values of binary logarithms as well.)
Verified: no
Solve time: 1m31s
Solution
Using the change-of-base formula,
$$ \lg x=\frac{\ln x}{\ln 2}, \qquad \log_{10}x=\frac{\ln x}{\ln 10}. $$
Therefore
$$ \ln x+\log_{10}x = \ln x+\frac{\ln x}{\ln 10} = \left(1+\frac1{\ln 10}\right)\ln x. $$
On the other hand,
$$ \lg x=\frac1{\ln2}\ln x. $$
Hence the approximation
$$ \lg x \approx \ln x+\log_{10}x $$
amounts to approximating the coefficient
$$ \frac1{\ln2} $$
by
$$ 1+\frac1{\ln10}. $$
The relative error is therefore
$$ \frac{ \left(1+\frac1{\ln10}\right)-\frac1{\ln2} }{ \frac1{\ln2} }. $$
Since
$$ \frac1{\ln10}\approx 0.43429448, \qquad \frac1{\ln2}\approx 1.44269504, $$
we obtain
$$ 1+\frac1{\ln10} \approx 1.43429448. $$
Thus
$$ \frac{ 1.43429448-1.44269504 }{ 1.44269504 } \approx -0.00582. $$
The magnitude of the relative error is therefore approximately
$$ 0.582%. $$
Since this is less than $1%$, the approximation
$$ \boxed{\lg x \approx \ln x+\log_{10}x} $$
is valid with less than $1%$ relative error. ∎