This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Avoid ordered comparisons of NaNs in ldbl-128ibm acosl and asinl
- From: Andreas Jaeger <aj at suse dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>, libc-alpha at sourceware dot org
- Date: Thu, 10 Oct 2013 19:36:50 +0200
- Subject: Re: Avoid ordered comparisons of NaNs in ldbl-128ibm acosl and asinl
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1310101722520 dot 1661 at digraph dot polyomino dot org dot uk>
On 10/10/2013 07:23 PM, Joseph S. Myers wrote:
> ldbl-128ibm acosl and asinl receive arguments that may be NaN (the
> wrappers only check for arguments with magnitude > 1.0), and do
> ordered comparisons on them. The only reason this fails to raise
> spurious "invalid" exceptions is, for hard-float, a GCC bug, which
> I've filed as <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58684>.
> For soft-float, it's a soft-fp bug, bug 14910, which I've proposed a
> patch <https://sourceware.org/ml/libc-alpha/2013-10/msg00365.html> to
> fix.
>
> This patch adds a check for NaNs at the start of those functions to
> avoid the problem (both for soft-float now, and for hard-float if the
> GCC bug is fixed in future).
>
> Tested for powerpc-nofpu.
>
> 2013-10-10 Joseph Myers <joseph@codsourcery.com>
>
> * sysdeps/ieee754/ldbl-128ibm/e_acosl.c (__ieee754_acosl): Check
> for NaNs before doing comparisons on argument.
> * sysdeps/ieee754/ldbl-128ibm/e_asinl.c (__ieee754_asinl):
> Likewise.
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