Bug report #5032

`log(100,10)` does not give the same result as `log10(100)`!

Added by Alister Hood about 12 years ago. Updated about 12 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Vectors
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:14807

Description

log(a,10) currently gives 1/log10(a)

log_help_fix.diff Magnifier (1.08 KB) Alister Hood, 2012-02-22 06:28 PM

History

#1 Updated by Alister Hood about 12 years ago

Sorry - I neglected to say that this is of course in the new field calculator and expression based labelling.

And you'll see the same effect comparing with ln()

#2 Updated by Martin Dobias about 12 years ago

  • Resolution set to invalid
  • Status changed from Open to Closed

The order of parameters is actually reversed from what you have expected: log(base,x) - that follows order used in other SQL engines (postgresql, mysql).

#3 Updated by Alister Hood about 12 years ago

Of course, thanks.
So unless it has changed since, I made a mistake when I wrote the help for it.
We need this fix.

Also available in: Atom PDF