SUMMARY log( [expression] ) in krunner gives the result of the natural log instead of base 10 log STEPS TO REPRODUCE 1. enter any log expression into krunner OBSERVED RESULT this evaluates to that of the natural log EXPECTED RESULT log() should probably be base 10 log, "ln()" and "log()" being the same is probably a bit counterintuitive SOFTWARE/OS VERSIONS KDE Plasma Version: 6.2.4 KDE Frameworks Version: 6.8.0 Qt Version: 6.8.1
I can reproduce this on Plasma 6.2.4. For what it's worth, KCalc itself does interpret log() as base 10, so it appears to be something specific on the KRunner side?
Well, this was bugging me and I wanted to see if there was something that would explain it...and as it turns out, KRunner actually uses Qalculate as its backend for the calculator function (https://userbase.kde.org/Plasma/Krunner#Calculator), Qalculate views log() as ambiguous without a specific base, and it defaults to e as the base. If you type log(10; 10) into KRunner, for example, you should get 1 as expected. So, this is *kind of* intended behavior...however, I do think there's a bug here still, as the intended Qalculate Base-10 Logarithm function - log10() - doesn't seem to be recognized by KRunner, so I switched the title accordingly. I'm saying that's the intended Base-10 log function based on the Qalculate manual (https://qalculate.github.io/manual/qalculate-definitions-functions.html#qalculate-definitions-functions-1-Exponents--Logarithms) and a comment left by a Qalculate contributor on this topic: "In Qalculate log() is primarily intended for logarithms with bases other than 10 or e" (https://github.com/Qalculate/libqalculate/pull/430)
Works as expected if you add an equals sign before it: "=log10(5)". This is sometimes needed when invoking Qalculate functions directly, which is a bit of a hidden feature.