Menu

Common (base 10) logarithm?

Techineer
2019-03-19
2019-03-19
  • Techineer

    Techineer - 2019-03-19

    Just installed the interpreter. Been awhile since I programmed in BASIC, and that was on a Commodore.

    I was aware that the LOG keyword returned the natural logarithm, but I seem to remember that there was a method of getting the common logarithm. LOG10() doesn't work on this machine.

    What's the trick?
    Thanks!

     
  • Techineer

    Techineer - 2019-03-19

    Never mind - I found the solution.

    Divide the natural logarithm of the veriable by the natural logarithm of 10 (the new base)

    Base 10 Log = Log(n)/Log(10)

    To find the logarithm of the number 6000:
    LET X=6000
    Y=LOG(X)/LOG(10)
    Print Y

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.