Search Postgresql Archives

Re: numeric precision when raising one numeric to another.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux