Re: factorial doc bug?

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: lockhart(at)fourpalms(dot)org
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: factorial doc bug?
Date: 2001-09-12 00:59:35
Message-ID: 20010912095935G.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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. The Postgres operator catalog has only
>one entry for factorial, taking an integer operand. If given a non-integer numeric argument, Postgres will try to convert that 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-integer is 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 take the factorial of a
> floating point number, Postgres will try to oblige.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2001-09-12 00:59:50 Re: syslog by default?
Previous Message Tatsuo Ishii 2001-09-12 00:59:18 Re: enable-unicode-conversion option?