Log Library - How is it done in the library code?

David Brooks dbrooks at osf.org
Wed Mar 13 01:24:15 AEST 1991


joshi at m.cs.uiuc.edu (Anil Joshi) writes:
|> I do not want the accuracy that might have been provided in the c library 
|> log(). It might be spending more time than necessary to calculate more
|> accurately than I want it to be. 

I agree with Doug.  It doesn't sound as though you have characterized the
speed of the library routine.

However, I'd point out that (a) speed can be helped by knowing how your
architecture stores FP numbers (b) most of them store an exponent
accessibly (c) some simple arithmetic on the exponent will give you an
approximation to the log.  How inaccurate to you want it?



More information about the Comp.lang.c mailing list