On Fri, 3 Feb 2023 at 01:18, Tom Lane wrote:
>
> Dean Rasheed writes:
>
> > 1). It doesn't work if log10val2 < 0, because then m < 0, and it
> > doesn't multiply by the remainder. And it then throws an overflow
> > error, because result.dscale comes out wrong when m < 0.
>
> I'm not quite sure th
Dean Rasheed writes:
> However, looking more closely, I think this function is more or less
> completely broken:
> 1). It doesn't work if log10val2 < 0, because then m < 0, and it
> doesn't multiply by the remainder. And it then throws an overflow
> error, because result.dscale comes out wrong wh
On Thu, 2 Feb 2023 at 15:15, Tom Lane wrote:
>
> Looking at this diff made me wonder why the static pow10[] array
> isn't marked "const"?
>
Good point.
However, looking more closely, I think this function is more or less
completely broken:
1). It doesn't work if log10val2 < 0, because then m <
Dean Rasheed writes:
> Ensure that numeric.c compiles with other NBASE values.
Looking at this diff made me wonder why the static pow10[] array
isn't marked "const"?
regards, tom lane
Ensure that numeric.c compiles with other NBASE values.
As noted in the comments, support for different NBASE values is really
only of historical interest, but as long as we're keeping it, we might
as well make sure that it compiles.
Joel Jacobson
Discussion:
https://postgr.es/m/06712c29-98e9-4