ln() vs. log()

04202016, 10:23 AM
Post: #21




RE: ln() vs. log()
Not a single equation, but here there is an exponential function and a logarithmic (in base 10) plot.
César  Information must flow. 

04212016, 07:52 PM
Post: #22




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 ... 

04242016, 02:38 PM
Post: #23




RE: ln() vs. log()
(04172016 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. FX850) LOG and LGT for the newer PB series (e. g. PB1000 but not the older PB100) 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/basiccompare.html 

04252016, 06:38 AM
(This post was last modified: 04252016 06:39 AM by Dieter.)
Post: #24




RE: ln() vs. log()
(04242016 02:38 PM)Marcus von Cube Wrote:(04172016 10:06 PM)Don Shepherd Wrote: Interestingly, the original Dartmouth BASIC had log() but it was really ln(). 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 base10 logarithm, i.e. lg(x). Excel is a special case: in a worksheet log is the base10 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 log_{x}y for a basex logarithm. (04242016 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 

04252016, 03:59 PM
Post: #25




RE: ln() vs. log()
(04182016 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)