From: | "Dann Corbit" <DCorbit(at)connx(dot)com> |
---|---|
To: | "Martijn van Oosterhout" <kleptog(at)svana(dot)org> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: numeric precision when raising one numeric to another. |
Date: | 2005-05-20 05:04:49 |
Message-ID: | D425483C2C5C9F49B5B7A41F89441547055BE1@postal.corporate.connx.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
At CONNX, we just do 100 digits using qfloat (about 104 actually).
Internally, all math is done using this type. Then we convert to the
smaller types [or character types] as requested.
I don't think that there is any business need for more than that.
A package like Maple might need to worry about it, or a theoretical
mathematician looking for patterns in digits or something like that.
But you can't please everybody.
> -----Original Message-----
> From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-
> owner(at)postgresql(dot)org] On Behalf Of Martijn van Oosterhout
> Sent: Thursday, May 19, 2005 2:48 PM
> To: Dann Corbit
> Cc: Alvaro Herrera; John Burger; pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] numeric precision when raising one numeric to
> another.
>
> 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 | OpenMacNews | 2005-05-20 05:11:32 | Re: 8.0.3 build error on Mac OS X 10.4 |
Previous Message | Tom Lane | 2005-05-20 04:57:45 | Re: 8.0.3 build error on Mac OS X 10.4 |