This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix ldbl-128 powl sign of result in overflow / underflow cases (bug 17097)
- From: Andreas Jaeger <aj at suse dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>, libc-alpha at sourceware dot org
- Date: Sun, 29 Jun 2014 09:59:25 +0200
- Subject: Re: Fix ldbl-128 powl sign of result in overflow / underflow cases (bug 17097)
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1406272150530 dot 8357 at digraph dot polyomino dot org dot uk>
On 06/27/2014 11:52 PM, Joseph S. Myers wrote:
> This patch fixes bug 17097, ldbl-128 powl producing overflowing /
> underflowing results with positive sign when the result should have
> been negative. This was shown up by the tests in non-default rounding
> modes added by my patch for bug 16315, but isn't actually limited to
> non-default rounding modes: rather, when rounding to nearest the
> wrappers produced a result with the correct sign and so always hid the
> bug unless -lieee was used to disable the wrappers. The problem is
> that in the cases where Y is large enough that the result overflows or
> underflows for X not very close to 1, but not large enough to overflow
> or underflow for all X != ± 1 (in the latter case Y is always an
> even integer), a positive overflowing / underflowing result is always
> returned, rather than one with the correct sign. This patch moves the
> relevant part of computation of the sign earlier and returns a result
> of the correct sign.
Thanks,
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