This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix cproj handling of (finite, NaN) arguments (bug 15531)
- 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: Tue, 20 Aug 2013 21:36:16 +0200
- Subject: Re: Fix cproj handling of (finite, NaN) arguments (bug 15531)
- References: <Pine dot LNX dot 4 dot 64 dot 1308201721510 dot 15834 at digraph dot polyomino dot org dot uk>
On 08/20/2013 07:22 PM, Joseph S. Myers wrote:
> Bug 15531 (extracted from reported LSB test failures) is cproj
> returning an infinity for an argument with one finite and one NaN
> part, when the ISO C specification is that it should return the
> argument unchanged in that case.
>
> This patch simplifies the code to follow the ISO C specification more
> directly to fix this bug. Tested x86_64 and x86.
>
> 2013-08-20 Joseph Myers <joseph@codesourcery.com>
>
> [BZ #15531]
> * math/s_cproj.c (__cproj): Only return an infinity if one part of
> argument is infinite.
> * math/s_cprojf.c (__cprojf): Likewise.
> * math/s_cprojl.c (__cprojl): Likewise.
> * sysdeps/ieee754/ldbl-128ibm/s_cprojl.c (__cprojl): Likewise.
> * math/libm-test.inc (cproj_test_data): Add more tests.
Looks fine, 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