Change [logx] to calculate the base10 logarithm.

Log in to Vote
4
4 Votes • 6 Comments
Currently, logx calculates the natural logarithm of x (and is therefore equivalent to lnx). AFAIK, logx is usually interpreted as the base 10 logarithm of x. Wolfram Alpha does return the natural logarithm, but it adds a note and a link to switch to base 10. I believe that, if possible, DuckDuckGo should default to base 10.
Source:
Change the value pulled from Wolphram Alpha.
• posted 4 years and 4 months ago Improvement

anonymous
As of now the base 10 is not supported by default as wolfram integration treats to the base e = 2.718(approx).
But this is doable by giving the exact base you want or even with multiple bases with a little quirky syntax and math.
:-)

Example : log 20 / log 10 will give you the value of log20 to the base 10.
log 20 / log 2 will give you the value of log20 to the base 2

Cheers
posted by <hidden> • 4 years and 4 months ago Link
zac
This could be changed by using a different source our writing a Goodie (perl function) instant answer for it:

docs https://duck.co/duckduckhack/goodie_over...
examples https://github.com/duckduckgo/zeroclicki...
posted by zac Staff4 years and 4 months ago Link
anonymous
I am behind this cuddling goodie..I will submit the pull request before tomorrow hopefully.
posted by <hidden> • 4 years and 4 months ago Link
anonymous
Phew..
I wrote a new goodie for calculating log but Just now noticed a mayhem during testing.
This is already implemented in Calculator Goodie.
Syntax is log10(20) infact all the log queries will be handled by calculator like
log(20) => natural logarithm
log10(20) => Log to the base 10

Do we still need improvement in this aspect?
If so please let me know.I will try to squeeze in things in calculator goodie
posted by <hidden> • 4 years and 4 months ago Link
clel
(At least in Germany) the natural logarithm is written as "ln(...)". Maybe one could edit the current way of understanding, so "log(...)" uses log to the base 10 and "ln(...)" uses the natural logarithm. Also one cannot type for example "log15(10)". That would be some improvements, I would like.
posted by clel 4 years and 4 months ago Link
anonymous
It took some time to revert back on this goodie.
This instant answer feature is been denied.
Log(x) will default only to Log(x) to base e and not Log(x) to base 10.
If the user wants Log(x) to the base 10 then the user has to type Log10(x) which will give the respective result

More details on discussion is here
posted by <hidden> • 4 years and 4 months ago Link