From: | John Burger <john(at)mitre(dot)org> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: numeric precision when raising one numeric to another. |
Date: | 2005-05-19 02:46:50 |
Message-ID: | f7dbed2cc9c8db8cb2cbfbcf546a38b7@mitre.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-patches |
>> Considering that the SQL spec says the result of multiplication of
>> exact
>> numeric types is exact numeric types of precision S1+S2, and
>> exponentiation is nothing more than repeated multiplication,
>
> ... not when the exponent is non-integral.
For one thing. For another, I believe the standard C library only has
floating point exponentiation functions, not that there aren't plenty
of numeric libraries with integral ones. Finally, exponentiated
numbers get real big, real fast, and the floating point types can hold
much larger magnitudes than the integer types, albeit inexactly. For
example, on the Mac I'm using now, long long ints max out at about
10^19, while long doubles can represent 10^308.
- John Burger
MITRE
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-05-19 03:21:53 | Re: 8.0.3 build error on Mac OS X 10.4 |
Previous Message | Michael Glaesemann | 2005-05-19 02:43:02 | Re: 8.0.3 build error on Mac OS X 10.4 |
From | Date | Subject | |
---|---|---|---|
Next Message | Abhijit Menon-Sen | 2005-05-19 02:58:10 | md5(bytea) |
Previous Message | Neil Conway | 2005-05-19 01:40:32 | Re: patches for items from TODO list |