Re: numeric precision when raising one numeric to another.
От | Jan Wieck |
---|---|
Тема | Re: numeric precision when raising one numeric to another. |
Дата | |
Msg-id | 42A47324.2060705@Yahoo.com обсуждение исходный текст |
Ответ на | Re: numeric precision when raising one numeric to another. (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-general |
On 5/20/2005 2:26 PM, Tom Lane wrote: > numeric_power can in theory deliver an exact answer when the exponent is > a positive integer. Division can deliver an exact answer in some cases > too --- but the spec doesn't say it must do so when possible. So I > would say that there is no spec requirement for special behavior for > integral exponents. There are cases where a numeric_power could in theory deliver an exact answer for a fractional exponent. That is when the exponent is a natural fraction because the result is the m'th root of x^n (for n/m). As an example 4^1.5 = 8. Of course does the m'th root need to produce a finite result, which I think is not guaranteed for arbitrary numbers. I'm not advocating to do that, just saying it is theoretically possible for a subset of possible inputs. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #
В списке pgsql-general по дате отправления: