Michael Harris

Jan 6, 2021

2 min read

LOG or LN?

Source: Wikipedia

I am not a mathematician but I find it interesting that while some people are preparing to go to Mars, mathematics, the most basic science and the language used to model the world hasn’t made up its mind yet about the choice of mathematical functions for base 10 and natural logarithms.

“Well, it’s a matter of convention!” some will reply. Obviously, but the problem comes when someone changes the convention rules in the middle of the game.

Specifically, in Compendium of Mathematics, the function for base 10 algorithm is given as log x and for natural as ln x. But if you use R, log is for natural and log10 is for base 10.

R language

Then try to use the Windows 10 calculators: you will see log and ln functions:

Windows 10 calculator

I do not use Matlab (I should start again at some point) but a follower in twitter @stigbb1 tweeted this:

Here too, log stands for natural log.

Are the above differences important at all? In my opinion they are because mathematics is supposed to be a formal science. Why isn’t there an agreement on basic terminology ? Imagine getting a result in R using log (natural log) and then in a hurry trying to use Windows calculator to confirm and you also use log there. It happened to me in the past.

Needless to say that experienced programmers and scientists in general always test the functions before using them. The question here is more related to conventions: why isn’t there a consensus and some languages use log for natural and some calculators use ln and log for base 10. Before we go to Mars we should at least try to be consistent.

About the author.