Posted by Sebastian Moleski on 1999-04-15
Hi,
To explain somebody's question what logarithms actually are:
Logarithms are the third operation next to powers and roots.
Let's consider following equation: 2^3=8 (^ is the power symbol). Using
logs, you can find out the x in ___2^x=8___. It's the logarithm of 8 to the
base of 2 or log_2 8 ("2" being subscripted). That's all logs are about. With
some of the special rules and theorems applying to logarithms, computing of
complex calculations can be made a lot easier. However, today's calculators
made that use almost obsolete.
A natural logarithm (usually written as ln) is the logarithm of a number
to the base of _e_. Thus, log_e x. e (Euler's constant) is an irrational
number (much like pi) that is built through the following sum:
e = 1/0! + 1/1! + 1/2! + 1/3! + 1/4!....
= 2.71828182845904523536028747135266...
And now to calculating logarithms:
Logarithms can't really be calculated using pencil and paper without using
some infinite series. That's because a big part of all logarithms is
irrational and therefore infinite in decimal numbers (i.e. behind the point). The
ln or log functions in programming languages are either translated into
commands to the numeric co-processor (e.g. pentium family) or approximated using
above infinite series.
By the way, the mathematicians that first "discovered" logarithms and
calculated all these log-tables used approximation: you take two numbers that
are close together and that give something close to the searched logarithm and
then from there tried to find numbers that get closer and closer to the
logarithm.
Example:
the logarithm of 6 to the base 2 = x (i.e. 2^x = 6)
let's start with 3 (2^3=8) and 2 (2^2=4)
[2,3] --> 4.0000, 8.0000
[2.5,3] --> 5.6569, 8.0000
[2.5, 2.6] --> 5.6569, 6.0629 // 2.6 is pretty close :-)
[2.58, 2.59] --> 5.9794, 6.0210 // closer!
[2.583, 2.585] --> 5.9918, 6.0002 // even closer
..and so on
My calculator tells me that it's 2.584962501...
It's annoying to do it that way, isn't it?
---
Sent through Global Message Exchange - http://www.gmx.net
Previous post | Next post | Timeline | Home