Re: factorial doc bug?
От | Tatsuo Ishii |
---|---|
Тема | Re: factorial doc bug? |
Дата | |
Msg-id | 20010910141206C.t-ishii@sra.co.jp обсуждение исходный текст |
Ответ на | Re: factorial doc bug? (Gavin Sherry <swm@linuxworld.com.au>) |
Список | pgsql-hackers |
> On Mon, 10 Sep 2001, Tatsuo Ishii wrote: > > > In typeconv.sgml we have an example: > > > > tgl=> select (4.3 !); > > ?column? > > ---------- > > 24 > > (1 row) > > Mathematically speaking, one cannot find the factorial of such a > number. Users could easily cast/round a float to an integer - making it > suitable for such an operation. > > I'd say it was a documentation issue. My point is the docs claims that PostgreSQL automaticaly converts 4.3 to 4 in this case. >This example illustrates an interesting result. Traditionally, the >factorial operator is defined for integers only. The <productname>Postgres</productname> >operator catalog has only one entry for factorial, taking an integer operand. >If given a non-integer numeric argument, <productname>Postgres</productname> >will try to convert that argument to an integer for evaluation of the >factorial. -- Tatsuo Ishii
В списке pgsql-hackers по дате отправления: