Glen Low wrote: > > I need a fast exponent and logarithm routine for floats. It should > preferably use only adds, subtracts and multiplies; divides and square > roots are permissible if necessary. It should not use large lookup > tables. An additional wrinkle (or help) is that there's a exponent and > a logarithm estimate available. > > Newton-Raphson seems of no use since I can't use the inverse function.
It may be of more use than you think. For y = ln(x), the recursion
y = y - (1 - x*exp(-y))
will work quickly since you can (probably) work with normalized numbers for which the series approx for exp(-y) won't need many terms to get the precision you want. With decent estimates this will take only a few iterations.