Problem with factorial operator

From: Jean-Luc Lachance <jllachan(at)nsd(dot)ca>
To: "PostgreSQL General Help (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Problem with factorial operator
Date: 2002-04-04 17:16:58
Message-ID: 3CAC8A8A.2FFC3DC0@nsd.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

The PG Documentation states:

tgl=> select cast(text '44' as int8) ! as "factorial";
factorial
---------------------
2673996885588443136
(1 row)

If you try it, you will get the same result, but it is the wrong answer.
Factorial work up to 20. After that one gets negative results.

JLL

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message tmorrison 2002-04-04 18:58:54 Update to readline and Postgresql
Previous Message virka prasetia 2002-04-04 17:10:56 installation problem