This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix fdim handling of infinities (bug 15797)
- From: Andreas Jaeger <aj at suse dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 21 Aug 2013 21:53:07 +0200
- Subject: Re: Fix fdim handling of infinities (bug 15797)
- References: <Pine dot LNX dot 4 dot 64 dot 1308211640420 dot 32351 at digraph dot polyomino dot org dot uk>
On 08/21/2013 06:43 PM, Joseph S. Myers wrote:
> This patch fixes bug 15797, incorrect fdim handling of infinities, by
> removing the bogus check for infinities when returning x - y for NaN
> arguments and instead checking later when determining whether an
> infinite result means overflow. Appropriate testcases are added and
> existing ones made to verify that errno is unchanged. (It does not do
> anything about bug 6796, missing errno setting on overflow from
> architecture-specific versions, or add any testcases relating to
> overflow.)
>
> Tested x86_64 and x86.
>
> 2013-08-21 Joseph Myers <joseph@codesourcery.com>
>
> [BZ #15797]
> * math/s_fdim.c (__fdim): Check for infinite arguments if result
> is infinite, not alongside NaN test.
> * math/s_fdimf.c (__fdimf): Likewise.
> * math/s_fdiml.c (__fdiml): Likewise.
> * math/libm-test.inc (fdim_test_data): Add more tests. Test that
> errno is unchanged.
Ok, 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