BUG #16901: log(1, anyvalue) gives division by zero error
The following bug has been logged on the website:
Bug reference: 16901
Logged by: Sam Woodward
Email address: samuelwoodward@gmail.com
PostgreSQL version: 13.2
Operating system: Windows 10
Description:
for example log(1, 10) gives division by zero error whereas log10(1) gives 0
PG Bug reporting form <noreply@postgresql.org> writes:
for example log(1, 10) gives division by zero error whereas log10(1) gives 0
I think you have the arguments backwards: the equivalent
computation is log(10, 1) not log(1, 10).
regards, tom lane
Doh.. 🤦♂️
On Fri, 26 Feb 2021, 16:55 Tom Lane, <tgl@sss.pgh.pa.us> wrote:
Show quoted text
PG Bug reporting form <noreply@postgresql.org> writes:
for example log(1, 10) gives division by zero error whereas log10(1)
gives 0
I think you have the arguments backwards: the equivalent
computation is log(10, 1) not log(1, 10).regards, tom lane