Re: Numeric version of factorial()

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Numeric version of factorial()
Date: 2003-12-01 04:48:04
Message-ID: 200312010448.hB14m4016031@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-patches


Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Gavin Sherry wrote:
> 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

Content-Description:

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Oliver Elphick 2003-12-01 07:29:57 Re: [HACKERS] initdb should create a warning message [was Re:
Previous Message Neil Conway 2003-11-30 23:18:54 Re: [HACKERS] initdb should create a warning message [was Re:

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2003-12-01 04:50:57 Re: [HACKERS] Index creation takes for ever
Previous Message Bruce Momjian 2003-12-01 04:10:09 Re: [PATCH] Re: [pgsql-advocacy] Why READ ONLY transactions?