Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!sol.ctr.columbia.edu!emory!athena.cs.uga.edu!greg From: greg@athena.cs.uga.edu (GOD (Albert Ross)) Newsgroups: comp.lang.pascal Subject: Re: Real LOGn functions in TP 5.5 needed Message-ID: <1991Mar22.051119.12581@athena.cs.uga.edu> Date: 22 Mar 91 05:11:19 GMT References: <1991Mar20.145939.83@gnv.ifas.ufl.edu> <1991Mar20.220800.24027@midway.uchicago.edu> <1991Mar21.122959.346@matai.vuw.ac.nz> Organization: University of Georgia, Athens Lines: 30 In article <1991Mar21.122959.346@matai.vuw.ac.nz> forbesmc@matai.vuw.ac.nz writes: >In article <1991Mar20.220800.24027@midway.uchicago.edu>, news@midway.uchicago.edu (News Administrator) writes: >> A quick question... >> TP has a natural log function. I need a LOGn(x) function that >> does not need a table lookup, and is highly accurate. Is there a quick >> algorithm or a real math library avalable? >> -dm >Look up the required function in any standard maths book or 'log tables' - >I think it goes something like this ; > > LOGn(x) = LN(x) / LN(n) > >where LN is the natural log function and n is the log base required, >x is the number whose log you require. Unless I misunderstood the question, the formula should read: LOGn(x) = LOG(x) / LOG(n) where the right hand side LOGs are base 10. (this formula usually spawns from an equation similiar to y=2^x where x is your base. Take base 10 of each side and solve.) Hope this helps.... greg@athena.cs.uga.edu ALBATROSS rules! University of Georgia ----------------------------------------------------------------------------- One can't proceed from the informal to the formal by formal means. --