# I would like to know the algorithm for calculating the precise value of say log of a real number  to the base 10enthusiast

SHAIK AASIF AHAMED
10 years ago
Hello student,
The idea is to write any positive numberxas :
x=m⋅10e
withmthe 'mantissa' between1and10(excluded) andethe exponent (integer power of10).
So thatlog10(x)=log10(m)+e
To keep notations shorter I'll writelog(x)forlog10(x)in the following.
The mantissa is between 1 and 10 and the idea is to memorize the first logarithms (here I'll use up to 5 digits, you may use fewer digits if you prefer) :
m log(m)
2 00.30103
3 0.47712
4 0.60206
5 0.69897
6 0.77815
7 0.84510
8 0.90309
9 0.95424
This seems to be much work but in fact many may be deduced from other values :
log(2n)=nlog(2)so thatlog(4)=2log(2),log(8)=3log(2)
more generallylog(a⋅b)=log(a)+log(b)so that the table could be rewritten (using toolog(10)=1) :
The table may be rebuilt with just three values!
I'll add too the usefullln(10)≈2.3026and it's multiplicative inverselog(e)≈0.43429≈12.3026.
Now let suppose you want to compute log(29012)=log(2.9012⋅104)=log(2.9012)+4log(10)=4+log(2.9012)
In first approximation we may uselog(2.9012)≈log(3)≈0.477to deduce thatlog(29012)≈4+0.477≈4.477.
Lite this if you know the value of lo2 to log9 by doing manipulations and applying log properties you can compute the values of any log value to the base 10.