Problem with factorial operator - Mailing list pgsql-general

From Jean-Luc Lachance
Subject Problem with factorial operator
Date
Msg-id 3CAC8A8A.2FFC3DC0@nsd.ca
Whole thread Raw
In response to hex values  ("Oberpriller, Wade D." <oberpwd@nsc-msg01.network.com>)
Responses Re: Problem with factorial operator
Re: Problem with factorial operator
List 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

pgsql-general by date:

Previous
From: Neil Conway
Date:
Subject: Re: binary data storage
Next
From: tmorrison
Date:
Subject: Update to readline and Postgresql