| From: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-patches(at)postgresql(dot)org |
| Subject: | Re: Numeric version of factorial() |
| Date: | 2003-08-01 03:31:20 |
| Message-ID: | Pine.LNX.4.21.0308011330030.25534-200000@linuxworld.com.au |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs pgsql-patches |
On Thu, 31 Jul 2003, Tom Lane wrote:
> 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.
>
Attached is a revised patch based on your Tom's comments. It removes
int[248]fac(), modifies regression tests (which referenced int4fac()), and
implements a much cleaned numeric_fac().
> regards, tom lane
>
Thanks,
Gavin
| Attachment | Content-Type | Size |
|---|---|---|
| factorial2.diff | text/plain | 13.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2003-08-01 04:46:45 | Re: Mysql -> Postgresql pitfalls |
| Previous Message | Tom Lane | 2003-08-01 02:08:01 | Re: Numeric version of factorial() |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Lee Kindness | 2003-08-01 15:12:37 | 7.4 COPY BINARY Format Change |
| Previous Message | Tom Lane | 2003-08-01 03:05:51 | Re: contrib regression test update |