ln() vs. log()

04202016, 10:23 AM
Post: #21




RE: ln() vs. log()  
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) https://my.numworks.com/python/steveg1cmz 

05132022, 11:15 AM
Post: #26




RE: ln() vs. log()
(04172016 10:19 PM)Han Wrote: That is \( \ln(x) = \frac{\log(x)}{\log(10)} \) with log just being a conventional shortcut for \( \log_{10}\). But then \(\log_{10}(10) = 1\) and thus: \( \begin{align} \ln(x) &= \frac{\log(x)}{\log(10)} \\ &= \frac{\log_{10}(x)}{\log_{10}(10)} \\ &= \frac{\log_{10}(x)}{1} \\ &= \log_{10}(x) \\ &= \log(x) \\ \end{align} \) Thus, you either meant: \( \ln(x) = \frac{\log(x)}{\log(e)} \) Or then: \( \log(x) = \frac{\ln(x)}{\ln(10)} \) 

05132022, 10:38 PM
Post: #27




RE: ln() vs. log()
Actually, Bel is the original unit and the power of signal S, measured in Bel is
log (S / Sref) [using base10 log] As this unit was not convenient enough, a smaller unit became more popular. It is the deci Bel, which is a tenth part of a Bel. Hence the symbol is dB, with a lower case d and an upper case B. As the unit is the tenth part of the Bel, a 10times multiplier should be applied to the magnitude. So the power of signal S, measured in dB is 10 log (S / Sref) [using base10 log] Bels and deciBels are intended to compare powerlike quantities. As the power of an electrical signal is related to the square of the voltage, V (or, for that matter, the square of the current, I), it is usually possible to state that the power of signal S, measured in dB is 20 log (V / Vref) or 20 log (I / Iref) [using base10 log] However, this is valid only if the voltage (or current) of the signal and the reference are measured over the same impedance value. Otherwise, these formulas cannot be used. Please disregard any idiomatic or formatting mistake. (04182016 01:25 PM)Tugdual Wrote: Also decibel is Andrés C. Rodríguez (Argentina) Please disregard idiomatic mistakes. My posts are mostly from old memories, not from current research. 

05162022, 01:18 PM
Post: #28




RE: ln() vs. log()
"I never understood why there is no common unambiguous declaration of the logarithm function(s)"
Because base 10 logs don't exist to Mathematicians. The HP71 uses LOG10 and LGT [That is a new one!] for base 10, and LOG and LN for base e. 

« Next Oldest  Next Newest »

User(s) browsing this thread: