pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16901: log(1, anyvalue) gives division by zero error
3+ messages / 3 participants
[nested] [flat]

* BUG #16901: log(1, anyvalue) gives division by zero error
@ 2021-02-26 14:06  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Bug reporting form @ 2021-02-26 14:06 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: samuelwoodward@gmail.com

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #16901: log(1, anyvalue) gives division by zero error
@ 2021-02-26 16:55  Tom Lane <tgl@sss.pgh.pa.us>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2021-02-26 16:55 UTC (permalink / raw)
  To: samuelwoodward@gmail.com; +Cc: pgsql-bugs@lists.postgresql.org

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





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #16901: log(1, anyvalue) gives division by zero error
@ 2021-02-26 18:14  Samuel Woodward <samuelwoodward@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Samuel Woodward @ 2021-02-26 18:14 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs@lists.postgresql.org

Doh.. 🤦‍♂️

On Fri, 26 Feb 2021, 16:55 Tom Lane, <tgl@sss.pgh.pa.us> wrote:

> 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
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2021-02-26 18:14 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-02-26 14:06 BUG #16901: log(1, anyvalue) gives division by zero error PG Bug reporting form <noreply@postgresql.org>
2021-02-26 16:55 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-02-26 18:14   ` Samuel Woodward <samuelwoodward@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox