X-Original-To: pgsql-patches-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id DA044D1B94F for ; Mon, 1 Dec 2003 04:49:00 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 39150-02 for ; Mon, 1 Dec 2003 00:48:30 -0400 (AST) Received: from candle.pha.pa.us (unknown [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 3FB19D1B468 for ; Mon, 1 Dec 2003 00:48:29 -0400 (AST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id hB14m4016031; Sun, 30 Nov 2003 23:48:04 -0500 (EST) From: Bruce Momjian Message-Id: <200312010448.hB14m4016031@candle.pha.pa.us> Subject: Re: Numeric version of factorial() In-Reply-To: To: Gavin Sherry Date: Sun, 30 Nov 2003 23:48:04 -0500 (EST) Cc: Tom Lane , pgsql-patches@postgresql.org X-Mailer: ELM [version 2.4ME+ PL108 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/3 X-Sequence-Number: 9055 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 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@postgresql.org) -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073