From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Dann Corbit <DCorbit(at)connx(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)surnet(dot)cl>, John Burger <john(at)mitre(dot)org>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: numeric precision when raising one numeric to another. |
Date: | 2005-05-19 21:47:59 |
Message-ID: | 20050519214759.GE7748@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, May 19, 2005 at 02:25:58PM -0700, Dann Corbit wrote:
> Hmmm....
> I underestimated.
>
> pow(99999.99999,99999.99999) =
Yeah, a number with x digits raised to the power with something y digits
long could have a length approximating:
x * (10^y) digits
So two numbers both 4 digits long can have a result of upto 40,000
digits. You're only going to be able to them represent exactly for
cases where y is small and integer.
What's a meaningful limit? Do we simply say, you get upto 100 digits
and that's it? Or an extra parameter so you can specify directly?
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.
From | Date | Subject | |
---|---|---|---|
Next Message | Dann Corbit | 2005-05-19 21:52:08 | Re: numeric precision when raising one numeric to another. |
Previous Message | Tom Lane | 2005-05-19 21:27:18 | Re: Preserving data after updates |