Log(x) vs. ln(x) – The curse of scientific computing
medium.com
medium.com
As an EE, I use both frequently. Seems a lot of errors could be avoided by just comparing your code to a simple hand calculation. I suppose few do that these days.
Can you clarify what you mean? Are you missing a log_e_(x)?
The problem is the actual math/physics formalism is not!
Sure physics (and sometimes mathematics) do use the notation 'ln' every so often (if only because it's shorter) but you'd be hard pressed to find a reference in anything related to mathematics or physics that uses log as the base 10 logarithm.
Clearly the easiest way to avoid the ambiguity is to only ever use the natural logarithm, which is the choice made by all the programming languages you listed at the end. And since you don't list any references where log should refer to the base-10 logarithm I'll have to conclude that they made the right choice.
Start reading here: https://en.wikipedia.org/wiki/Protein_pKa_calculations
This is just the tip of the "log(x) vs ln(x)" iceberg.
I have copy pasted the ln(10) straight from Apple Calc. Thanks for pointing out.
We are essentially at the crossroad and obviously, programming, which develops nowadays a bit faster than theoretical physics or mathematics, pushes in one direction.
In my company, we are ridiculously pedantic about unit testing, but even with proper level of attention to detail we sometimes fail with getting 100% code coverage.
The biggest pain are log(x)/ln(x) issues in numerical optimization.