A92: Floating Point Logarithm


[Prev][Next][Index][Thread]

A92: Floating Point Logarithm




Hallo everybody

I'm currently working at Floating Point routines for my Forth on-calc
compiler and my problem is now, that I don't know how to create an
efficent routine for caculating logarithms. My best idea would be to
calculate the integral of the differentiated logarithm, 1/x, using
some integral approximation algorithm like the Simpson algorithm.
Does anybody of you know a better algorithm to approximate logarithms?
Another problem is how to calculate powers. I thought that implementing
a 2^n routine should be easy, but it's not if n is a floating point 
number. If I could calculate powers, the problems with the logarithms
would be solved since logarithms can be approximated by powers using 
Newton or Regula Falsi approximation. 

Any help would be appreciated.

Thanks in advance,
							David Kühling


Follow-Ups: