Re: factorial of negative numbers

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Ashutosh Bapat <ashutosh(dot)bapat(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: factorial of negative numbers
Date: 2020-06-16 11:18:54
Message-ID: 7095d570-f564-6c42-fe3b-65ca37b4b9a7@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-06-16 11:49, Dean Rasheed wrote:
> With [1], we could return 'Infinity', which would be more correct from
> a mathematical point of view, and might be preferable to erroring-out
> in some contexts.

But the limit of the gamma function is either negative or positive
infinity, depending on from what side you come, so we can't just return
one of those two.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2020-06-16 11:24:05 Re: Operator class parameters and sgml docs
Previous Message Amit Kapila 2020-06-16 10:57:26 Re: Parallel Seq Scan vs kernel read ahead