Re: Numeric version of factorial()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Numeric version of factorial()
Date: 2003-08-01 02:08:01
Message-ID: 3765.1059703681@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-patches

Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> writes:
> What are your feelings about numeric argument vs. int4/int8 arguments?

Actually I think it'd be fine to take int8. We'd not be able to cope
with any larger input anyway, and the inner loop could be noticeably
faster if the control logic just deals with int.

We could leave the factorial(numeric) case open for a future
implementation that uses gamma, if anyone gets hot to do it.

regards, tom lane

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Gavin Sherry 2003-08-01 03:31:20 Re: Numeric version of factorial()
Previous Message Gavin Sherry 2003-08-01 01:57:03 Re: Numeric version of factorial()

Browse pgsql-patches by date

  From Date Subject
Next Message Serguei Mokhov 2003-08-01 02:23:46 Russian NLS Update: psql
Previous Message Gavin Sherry 2003-08-01 01:57:03 Re: Numeric version of factorial()