From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Bug in numeric multiplication |
Date: | 2015-09-21 15:09:14 |
Message-ID: | 28880.1442848154@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I wrote:
> Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> writes:
>> The problem then arises in the final carry propagation pass. During
>> this phase of the computation, the carry from one digit (which can be
>> a shade under INT_MAX / NBASE) is added to the next digit, and that's
>> where the overflow happens.
> Nice catch! I think the comment could use a little more work, but I'll
> adjust it and push.
After trying to rework the comment to explain what maxdig really meant
after your changes, I came to the conclusion that it'd be better to do
it as per attached. Does this look sane to you?
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
numeric-mul-2.patch | text/x-diff | 6.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Dean Rasheed | 2015-09-21 15:21:10 | Re: Bug in numeric multiplication |
Previous Message | Adam Brightwell | 2015-09-21 14:46:59 | Re: proposal: multiple psql option -c |