Re: factorial doc bug? - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: factorial doc bug?
Date
Msg-id 20010912095935G.t-ishii@sra.co.jp
Whole thread Raw
In response to Re: factorial doc bug?  (Thomas Lockhart <lockhart@fourpalms.org>)
List pgsql-hackers
> > Shall we correct the doc or is that a bug?
> 
> Fix the docs...

Are you saying we should remove the whole chapter below from the docs?
--
Tatsuo Ishii

>5.2.1.3. Factorial
>
>This example illustrates an interesting result. Traditionally, the factorial operator is defined for integers only.
ThePostgres operator catalog has only
 
>one entry for factorial, taking an integer operand. If given a non-integer numeric argument, Postgres will try to
convertthat argument to an integer
 
>for evaluation of the factorial. 
>
>tgl=> select (4.3 !);
> ?column?
>----------
>       24
>(1 row)
>
>      Note: Of course, this leads to a mathematically suspect result, since in principle the factorial of a
non-integeris not defined. However,
 
>      the role of a database is not to teach mathematics, but to be a tool for data manipulation. If a user chooses to
takethe factorial of a
 
>      floating point number, Postgres will try to oblige.


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: enable-unicode-conversion option?
Next
From: Tatsuo Ishii
Date:
Subject: Re: syslog by default?