> Has anybody a faster (and only slightly less precise) version of these?
> Cutting calulation time by 10...50 is my goal.

You might describe the application, range of numbers, required accuracy,
etc.  In particular, is the base of the logarithm important to you?
Base-2 is often easier to implement than others.

I'd like to mention that pow(a,b) is MUCH harder to implement than
exp(b).  Use the latter whenever possible.  In particular, if a is
fixed, use exp(b * log(a)) rather than pow(a,b).  (In fact, that's a
common low-precision implementation technique even when a is not fixed.)

Also note that keeping logarithms in fixed-point format is often
convenient, and shaves a bit of overhead from the code when you
don't have hardware floating-point.

Reply via email to