[LCP]Base 2 logarithms

Vincent Penquerc'h Vincent.Penquerch at artworks.co.uk
Thu Oct 3 21:30:01 UTC 2002


> I'm not sure what that method is.  Would that be the trial-and-error
> method?

It's the iterative method that converges on the solution. I heard
that it can be generalized for other "good" functions.
However, I think it relies on the inverse function being cheap to
compute, but expoential is not cheap to compute, so, even if
doable, there is probably no speed benefits to it, though you
can try.
Basically, you approxiate the solution (say, your approximation
is log2(l)=x), then you compute e(x)=y, compare y to l, and use
this to correct your approximation. I can't remember how the
correction is done, but it probably is function dependant (and
probably uses the derivatives of the function).

-- 
Vincent Penquerc'h 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux.org.au/pipermail/linuxcprogramming/attachments/20021003/3d255ada/attachment.htm 


More information about the linuxCprogramming mailing list