Newsgroups: comp.lang.c Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: Log Library - How is it done in the library code? Message-ID: <1991Mar13.163841.20282@zoo.toronto.edu> Date: Wed, 13 Mar 1991 16:38:41 GMT References: <1991Mar11.022141.12068@m.cs.uiuc.edu> <15438@smoke.brl.mil> <1991Mar12.014416.4289@m.cs.uiuc.edu> <1991Mar12.211047.826@m.cs.uiuc.edu> Organization: U of Toronto Zoology In article <1991Mar12.211047.826@m.cs.uiuc.edu> joshi@m.cs.uiuc.edu (Anil Joshi) writes: >All I needed was the info as to what is being done in the library >routine so that I can emulate the library routine. ... why I asked >whether the code is available somewhere, so that I can make my >program efficient and fast. Unfortunately, you didn't really supply enough information for this. There is no single source for the log function; the answer is vendor- specific. As a particular case in point, on a 68xxx machine with a 68881, the best log routine consists of (ignoring calling-sequence overhead): FLOGN r1, r2 or the equivalent. That's right, one instruction. On most more modern machines the sequence will be more complex. :-) When you post such queries, you need to supply details on things like machine, compiler, and requirements. -- "But this *is* the simplified version | Henry Spencer @ U of Toronto Zoology for the general public." -S. Harris | henry@zoo.toronto.edu utzoo!henry