This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix clog / clog10 sign of zero result in round-downward mode (bug 16789)
- From: Andreas Jaeger <aj at suse dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>, libc-alpha at sourceware dot org
- Date: Wed, 02 Apr 2014 14:36:46 +0200
- Subject: Re: Fix clog / clog10 sign of zero result in round-downward mode (bug 16789)
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1404011543430 dot 24927 at digraph dot polyomino dot org dot uk>
On 04/01/2014 05:46 PM, Joseph S. Myers wrote:
> This patch fixes bug 16789, incorrect sign of (real part) zero result
> from clog and clog10 in round-downward mode, arising from that real
> part being computed as 0 - 0. To ensure that an underflow exception
> occurred, the code used an underflowing value (the next term in the
> series for log1p) in arithmetic computing the real part of the result,
> yielding the problematic 0 - 0 computation in some cases even when the
> mathematical result would be small but positive. The patch changes
> this code to use the math_force_eval approach to ensuring that an
> underflowing computation actually occurs. Tests of clog and clog10
> are enabled in all rounding modes.
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