LOGUSE.THD --- Copyright 1988 by Tony B. Anderson An original compilation of Compuserve Model 100 Forum messages for use by Forum members only. Captured messages describe technique of using the LOG command with number bases other than LOG(e) which is supplied as part of the Tandy Portable's ROM Code. #: 165559 S8/Tech/Programming 03-Mar-88 11:59:53 Sb: #M200 LOGARITHMS Fm: Phil Kelly 73100,2017 To: ALL I'm writing a basic program for the M200 and need to use a logarithm (base 10) in my formula. The only basic keyword that I can find is LOG(N) and that gives the natural logarithm (base "E"). Can anyone help me to use logarithms (base 10 ) so I can finish this program? Fm: Eiji Miura 76703,4311 Phil, To get a common log (base 10) of a number, you need to divide the natural log (base e) of that number by natural log of 10. log N = ln N / ln 10 So, in basic, it will look something like this: ANS=LOG(N)/LOG(10) 'ANS' will be a common log of a number 'N'. To change base, you can change '10' to whatever the base you want it to be. Hope this helps, ...Eiji... Fm: Tony Anderson 76703,4062 "N" is commonly used to indicate "Put a Number Here." Use LOG(10) Fm: Phil Kelly 73100,2017 Eiji, Thanks for your quick reply to my cry for help. As it turned out I got the same information just about the same time I got it from you, only in a different form. I found in a book that to convert a natural log (base e) to a common log (base 10), multiply by .4342945. To convert a common log to a natural log, multiply by 2.3026. Isn't that great? Now all I have to do is spend the next two weeks memorising this wonderful information. (That's a joke.) The information you gave me is much better and from that I was able to figure out how they got the above numbers. Also how much better it is to program A=LOG (N)/LOG(10) than to try to remember those long numbers and program A=LOG(N)* 4342945. I can remember what you told me but I'll never remember those numbers. Thanks again for your help. Fm: Phil Kelly 73100,2017 Tony, Thanks for your quick reply to my cry for help. I thought I would let you know where that's at. If you recall, I asked for help with programing logarithms on the Tandy M200. Yes the "N" in the basic expression LOG(N) does mean put a number here. In this case the number is the number that you want to find the log of. In this case it would be a log (base e) because that is all the M200 has. That doesn't mean that you can't work with log (base 10) though. Thanks to Eiji Miura 76703,4311, I found out that to convert log (base e) to log (base 10)all that need be done is to devide the result of finding the log (base e) of a number by the log (base e) of 10. Let me give you an example in basic to help you understand. If I wanted to find the log (base 10) of A on the M200 I would use this expression, X=LOG(A)/LOG(10 ). The variable X would then equal the log of A in base 10. Now that I have been through all of that I'll bet it's as clear as mud. At any rate, thanks again for your help. It's nice to know that lots of help is as close and my phone. Phil