pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Gavin Sherry <swm@linuxworld.com.au>
Cc: pgsql-patches@postgresql.org
Subject: Re: Numeric version of factorial()
Date: Thu, 31 Jul 2003 22:08:01 -0400
Message-ID: <3765.1059703681@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.21.0308011155340.18801-100000@linuxworld.com.au>
References: <Pine.LNX.4.21.0308011155340.18801-100000@linuxworld.com.au>

Gavin Sherry <swm@linuxworld.com.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



view thread (9+ messages)  latest in thread

Message-ID: <3765.1059703681@sss.pgh.pa.us>
Permalink:  ../3765.1059703681@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3765.1059703681@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, swm@linuxworld.com.au, pgsql-patches@postgresql.org
  Subject: Re: Numeric version of factorial()
  In-Reply-To: <3765.1059703681@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox