Re: [HACKERS] Automatic type conversion

From: "Eugene Selkov Jr(dot)" <selkovjr(at)mcs(dot)anl(dot)gov>
To: Dave Chapeskie <dchapes(at)ddm(dot)on(dot)ca>
Cc: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>, Postgres Hackers List <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Automatic type conversion
Date: 1998-05-10 08:07:56
Message-ID: 3555605C.FCB30834@mcs.anl.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dave Chapeskie wrote:
>
> On Sun, May 10, 1998 at 12:14:11AM +0000, Thomas G. Lockhart wrote:
> > -- there isn't a floating point factorial operator...
> > tgl=> select (4.3 !);
> > ?column?
> > --------
> > 24
> > (1 row)
>
> Am I the only one that thinks the above is wrong? 4.3 factorial is
> mathematically undefined and does NOT equal 24.

Just put the gamma function in there and assume the argument is always a
float. A decent gamma function algorithm should make a special case for
integers.

--Gene

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Eugene Selkov Jr. 1998-05-10 10:02:14 Re: [HACKERS] Help me!!! Pleass
Previous Message Dave Chapeskie 1998-05-10 06:23:22 Re: [HACKERS] Automatic type conversion