ln() vs. log()
04-20-2016, 10:23 AM
Post: #21
 emece67 Senior Member Posts: 377 Joined: Feb 2015
RE: ln() vs. log()
Not a single equation, but here there is an exponential function and a logarithmic (in base 10) plot.

04-21-2016, 07:52 PM
Post: #22
 JurgenRo Member Posts: 176 Joined: Jul 2015
RE: ln() vs. log()
I think Massimo gave the most meaningful reason for why it makes sense to have both (and even the lg logarithm to the base 2) in his short answer
Quote: Why 10^x and e^x then?
If it's reasonable to have 10^x, e^x and 2^x then, I guess, it's reasonable to have their inverse fuctions log, ln and lg, too ...
04-24-2016, 02:38 PM
Post: #23
 Marcus von Cube Senior Member Posts: 760 Joined: Dec 2013
RE: ln() vs. log()
(04-17-2016 10:06 PM)Don Shepherd Wrote:  Interestingly, the original Dartmouth BASIC had log() but it was really ln().

In Casio BASIC as implemented on their pocket computers there were two variants:

LN and LOG for the FX series (e. g. FX-850)
LOG and LGT for the newer PB series (e. g. PB-1000 but not the older PB-100)

I had a hard time writing my BASIC to WAV translators (CASette I/O Utilities) in a way to handle both variants correctly.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
04-25-2016, 06:38 AM (This post was last modified: 04-25-2016 06:39 AM by Dieter.)
Post: #24
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
RE: ln() vs. log()
(04-24-2016 02:38 PM)Marcus von Cube Wrote:
(04-17-2016 10:06 PM)Don Shepherd Wrote:  Interestingly, the original Dartmouth BASIC had log() but it was really ln().

In Casio BASIC as implemented on their pocket computers there were two variants:

LN and LOG for the FX series (e. g. FX-850)
LOG and LGT for the newer PB series (e. g. PB-1000 but not the older PB-100)

I never understood why there is no common unambigous declaration of the logarithm function(s). In most programming languages, "log" returns the natural logarithm ln(x) while on most calculators this is correctly called "ln". Here, "log" usually is the base-10 logarithm, i.e. lg(x). Excel is a special case: in a worksheet log is the base-10 logarithm, while in a VBA function it's ln(x). #-) As far as I can see the WP34s is the only calculator that uses correct designations: ln, lg, ld and finally logxy for a base-x logarithm.

(04-24-2016 02:38 PM)Marcus von Cube Wrote:  I had a hard time writing my BASIC to WAV translators (CASette I/O Utilities) in a way to handle both variants correctly.

?!? – what exactly was the problem?

Dieter
04-25-2016, 03:59 PM
Post: #25
 StephenG1CMZ Senior Member Posts: 918 Joined: May 2015
RE: ln() vs. log()
(04-18-2016 01:37 AM)Tim Wessman Wrote:  There's also the added wrinkle that in most CAS software packages use log(...) as base e and many don't have a base 10 variant.

I wonder whether there ought to be a "log10" function -(identical to log) which makes the code much more readable and avoids any worries that this "log" might have come from someone else's formula which assumed ln..

I remember when I first implemented some astronomical Software, astronomical text would often reference "log" without making clear which log was needed. Until I discovered .that almost always it would be log10 (if I recall correctly), some of my first attempts would call a LOGANY function, which could be quickly changed to call one log or the other until I saw the expected answer...

Stephen Lewkowicz (G1CMZ)
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)