| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | lockhart(at)fourpalms(dot)org |
| Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, j(dot)richter(at)wallstreet-develop(dot)de, pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: Bug #534: factorial function |
| Date: | 2001-12-10 16:37:44 |
| Message-ID: | 23148.1008002264@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Thomas Lockhart <lockhart(at)fourpalms(dot)org> writes:
>> ... I'd be sorely tempted to replace all three by a single
>> function that takes integer and returns numeric.
> Yikes. Although numeric is theoretically nice, it is hundreds of times
> slower than native doubles.
(a) As a wise man once said, "I can make it arbitrarily fast, if it
doesn't have to give the right answer". (b) The factorial function
doesn't strike me as a performance bottleneck. (c) I have no objection
to offering a double-precision-based gamma function alongside the
integer factorial function. But I think factorial should give an exact
answer as far as is possible before it overflows.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | pgsql-bugs | 2001-12-10 17:24:03 | Bug #535: postgreSQL v7.1.3 doesn't build properly with gcc v3.0.2 on Solaris 8 |
| Previous Message | Thomas Lockhart | 2001-12-10 16:28:11 | Re: Bug #534: factorial function |