Search Postgresql Archives

Re: Exponentiation confusion

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

 



Dean Rasheed <dean.a.rasheed@xxxxxxxxx> writes:
> The most obvious thing to do is to try to make power_var_int() choose
> the same result rscale as power_var() so that the results are
> consistent regardless of whether the exponent is an integer.

Yeah, I think we should try to end up with that.

> It's worth noting, however, that that will cause in a *reduction* in
> the output rscale rather than an increase in some cases, since the
> power_var_int() code path currently always chooses an rscale of at
> least 16, whereas the other code path in power_var() uses the rscales
> of the 2 inputs, and produces a minimum of 16 significant digits,
> rather than 16 digits after the decimal point.

Right.  I think this is not bad though.  In a lot of cases (such
as the example here) the current behavior is just plastering on
useless zeroes.

			regards, tom lane





[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux