From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26067 invoked by alias); 25 Mar 2013 15:54:28 -0000 Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org Received: (qmail 25634 invoked by uid 89); 25 Mar 2013 15:54:21 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 25 Mar 2013 15:54:21 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2PFsI4v005220 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 25 Mar 2013 11:54:18 -0400 Received: from [10.3.113.51] (ovpn-113-51.phx2.redhat.com [10.3.113.51]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2PFsHUc001855; Mon, 25 Mar 2013 11:54:18 -0400 Message-ID: <51507329.3090904@redhat.com> Date: Mon, 25 Mar 2013 15:54:00 -0000 From: "Carlos O'Donell" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Thomas Schwinge CC: libc-alpha@sourceware.org, libc-ports@sourceware.org Subject: Re: [attention machine maintainers] [PATCH] issignaling References: <8762148l9v.fsf@schwinge.name> <87r4j73cqo.fsf@schwinge.name> In-Reply-To: <87r4j73cqo.fsf@schwinge.name> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2013-03/txt/msg00159.txt.bz2 On 03/22/2013 07:17 AM, Thomas Schwinge wrote: > Hi! > > On Wed, 06 Mar 2013 18:56:28 +0100, I wrote: >> In IEEE 754-1985, »Annex A Recommended Functions and Predicates«, 10) a >> function to distinguish signaling from quiet NaNs is suggested. This is >> further elaborated in IEEE 754-2008, »5.7.2 General operations« as a >> isSignaling operation. Such a macro/function is not yet part of any >> published revision of the C programming language standard, but has been >> under discussion for some time alreay, see for example in >> 's >> N1664 (the latest of its kind that is publically available, as far as I >> know), »14.7 Inquiry macros [...] Suggested change to C11: [...] 7.12.3.7 >> The issignaling macro«: >> >> | Synopsis >> | [1] #define __STDC_WANT_IEC_00000_EXT1__ >> | #include >> | int issignaling(real-floating x); >> | >> | Description >> | [2] The issignaling macro determines whether its argument value is a signaling NaN, without >> | raising a floating-point exception. >> | >> | Returns >> | [3] The issignaling macro returns a nonzero value if and only if its argument is a signaling NaN. > > I have now pushed a new version of this patch in the > tschwinge/issignaling branch. Would machine maintainers please test this > branch/patch and report back? Any new testsuite failures are > interesting, and especially also any differences in math/*.out files. > > Carlos, is my understanding correct (based on a Wikipedia article), that > HPPA is (as MIPS) one of the few HIGH_ORDER_BIT_IS_SET_FOR_SNAN (see the > patch) architectures? Correct. I have verified this for you here: ~~~ PA-RISC 2.0 Architecture: Floating-point Coprocessor 8-7 "If the number is a NaN, then the leftmost bit in the fraction, b1, determines whether the NaN is signaling or quiet. If b1 is 1, the NaN is a signaling NaN. If b1 is 0, it is a quiet NaN." ~~~ > --- /dev/null > +++ ports/sysdeps/hppa/math_private.h > @@ -0,0 +1,27 @@ > +/* Internal math stuff. HPPA version. > + Copyright (C) 2013 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + . */ > + > +#ifndef _MATH_PRIVATE_H > + > +/* One of the few architectures where the meaning of the quiet/signaling bit is > + inverse to IEEE 754-2008 (as well as common practice for IEEE 754-1985). */ > +#define HIGH_ORDER_BIT_IS_SET_FOR_SNAN > + > +#include_next > + > +#endif This looks good to me. Cheers, Carlos.