Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!emory!ogicse!zephyr.ens.tek.com!vice!bobb From: bobb@vice.ICO.TEK.COM (Bob Beauchaine) Newsgroups: comp.lang.pascal Subject: Re: Real LOGn functions in TP 5.5 needed Message-ID: <7152@vice.ICO.TEK.COM> Date: 23 Mar 91 06:29:37 GMT Reply-To: bobb@vice.ICO.TEK.COM (Bob Beauchaine) Organization: Tektronix, Inc., Beaverton, OR. Lines: 24 >This is the function I have been using, but I am getting some unexpected >results. (Perhaps I mis-remebered the formula?). Also, I am doing real-time >analysis, and I thought that TP used a table for LN(), and making 2 passes >to that function would be murder (Not using a '387...I know...I know...). >I want a foolproof LOGn function that is fast, compact, and isn't dependent >on the LN() function. I'm gonna check on TP using a table lookup for the LN() function, but that doesn't seem exactly viable with a range of possible values like the LN() function can handle... As for making two passes to the LN() function, sounds like you need to brush up on your basic CS coursework. The LN(10) function could be precomputed, or better yet, you could declare the value as a constant at the top of your program. I'd be surprised if you could outsmart the guys at Borland who wrote the Math package, which has been an industry leader in speed for quite some time now. /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ Bob Beauchaine bobb@vice.ICO.TEK.COM C: The language that combines the power of assembly language with the flexibility of assembly language.