Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!paperboy!osf.org!dbrooks From: dbrooks@osf.org (David Brooks) Newsgroups: comp.lang.c Subject: Re: Log Library - How is it done in the library code? Keywords: log, library, series expansion Message-ID: <19878@paperboy.OSF.ORG> Date: 12 Mar 91 15:24:15 GMT References: <1991Mar11.022141.12068@m.cs.uiuc.edu> <15438@smoke.brl.mil> <1991Mar12.014416.4289@m.cs.uiuc.edu> Sender: news@OSF.ORG Organization: Open Software Foundation Lines: 12 joshi@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?