On Mon, 16 Nov 2026 at 15:20, Tom Lane <[email protected]> wrote:
>
> Dean Rasheed <[email protected]> writes:
> > Having said that, do we still care about supporting other NBASE
> > values? If NBASE == 10, the overflow case would have weight == 1 and
> > digits[0] == 1, which would need to be treated differently.
>
> There are already places that assume NBASE==10000.  Still, I feel
> that this is overthinking the problem.  Jianqiao's solution is
> obviously correct, and if you think maybe it isn't, changing the
> "if" into a "while" would take care of any strange roundoff effects
> in the second division.

OK, I guess it has the advantage of being nice and simple. Changing
the "if" to a "while" doesn't make sense.

Regards,
Dean


Reply via email to