Re: [HACKERS] Automatic type conversion - Mailing list pgsql-hackers

From Eugene Selkov Jr.
Subject Re: [HACKERS] Automatic type conversion
Date
Msg-id 3555605C.FCB30834@mcs.anl.gov
Whole thread Raw
In response to Automatic type conversion  ("Thomas G. Lockhart" <lockhart@alumni.caltech.edu>)
List 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

pgsql-hackers by date:

Previous
From: Dave Chapeskie
Date:
Subject: Re: [HACKERS] Automatic type conversion
Next
From: "Eugene Selkov Jr."
Date:
Subject: Re: [HACKERS] Help me!!! Pleass