Stuart Allman wrote: > > Give this one a whirl and give me some feedback. > > (-1/sqrt(x+0.02) + 0.5) / ln(10) > > It's a little less accurate around .5, but that's OK. Take a look at the > plots of log10 and this approximation before you criticize too heavily. > A few months ago I picked up a book called "Dead Reckoning: Calculating Without Instruments", by Ronald W. Doerfler. I recalled seeing something about logarithm calculations and decided to look it up again last night. I came across formula very similar to Stuart's: 6*(x - 1) 1 log(x) ~ ------------------ * ------ x + 1 + 4*sqrt(x) ln(10) This is called Borchardt's Algorithm. Doerfler discusses briefly how it is derived. He also says that there is an extrapolation method called Richardson's extrapolation that can be used to get a more accurate expression. However, for .7 < x < 1.3, this approximation is accurate to 7 significant figures. It is still quite accurate for the 0 < x < .5 range Stuart originally requested: x log(x) Borchardt's Approximation error -------------------------------------------------------------- .1 -1 -0.99166 0.83% .2 -0.69897 -0.69746 0.22% .3 -0.52288 -0.52251 0.071% .4 -0.39794 -0.39785 0.023% .5 -0.30103 -0.30101 0.000% 1.5 0.17609 0.17609 0.000% 2.0 0.30103 0.30101 0.000% 10.0 1 0.99166 -0.83% Maybe Przemek will be kind enough to plot another one of those fancy ASCII plots. Incidently, Doerfler's book has a bunch of interesting stuff (that is, if you posess that certain geek mentality). He discusses many techniques for fast arithmetic, roots, powers, logarithms, inverse logs, trig functions etc. His objective is more towards mental computation and not computer algorithms. However, often times the most optimum technique for one is also the most optimum for the other. Scott