[PATCH] Fix determination of lower precision in __mul
Andreas Jaeger
aj@suse.com
Fri Feb 15 15:39:00 GMT 2013
On 02/13/2013 04:05 PM, Siddhesh Poyarekar wrote:
> Hi,
>
> I introduced a dormant buglet when I committed the patch that skips
> multiplication of zeroes. The loop to determine the lower precision
> of the two input numbers is buggy since it checks X[i] * Y[i] to be
> non-zero to ensure that both mantissa digits are non-zero. This is a
> wrong check though since we could have numbers that have mantissa as
> such:
>
> X = {1, 0, 0, 1, 0, 0}
> Y = {1, 1, 1, 0, 0, 0}
>
> Here, the higher precision (ip2) ought to be 3 and the lower (ip)
> ought to be 2. The product check however makes the lower one as 0. I
> didn't find any input that actually triggered this bug, but here's a
> patch to fix it anyway. I had written it some time back, but it was
> on another branch and had forgotten to update the submitted patch;
> sorry about that.
>
> Verified that it does not cause any regressions in the testsuite. OK
> to commit?
yes, this is ok,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
More information about the Libc-alpha
mailing list