From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6167 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] Make musl math depend less on libgcc builtins Date: Thu, 18 Sep 2014 19:55:47 +0200 Message-ID: <20140918175546.GV21835@port70.net> References: <20140911073532.GA3179@zx-spectrum> <20140911094705.GF21835@port70.net> <20140911114207.GA5041@zx-spectrum> <20140911122651.GH21835@port70.net> <20140911132253.GA5487@zx-spectrum> <20140911141123.GL21835@port70.net> <20140918142840.GA9425@zx-spectrum> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1411062967 7486 80.91.229.3 (18 Sep 2014 17:56:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Sep 2014 17:56:07 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6180-gllmg-musl=m.gmane.org@lists.openwall.com Thu Sep 18 19:56:02 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XUfvz-0001SI-WC for gllmg-musl@plane.gmane.org; Thu, 18 Sep 2014 19:56:00 +0200 Original-Received: (qmail 7638 invoked by uid 550); 18 Sep 2014 17:55:59 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 7630 invoked from network); 18 Sep 2014 17:55:58 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <20140918142840.GA9425@zx-spectrum> User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:6167 Archived-At: * Sergey Dmitrouk [2014-09-18 17:28:40 +0300]: > On Thu, Sep 11, 2014 at 07:11:23AM -0700, Szabolcs Nagy wrote: > > on a correct implementation ==, != are quiet, but <,>,<=,>= > > raise invalid if any of the operands are nan > > I wanted to get some details on this, but failed to find relevant > sections of C99/IEEE754 standards. I see C99 referring to IEEE754, is > it in "5.11 Details of comparison predicates" section of IEEE754? > Could you please point me to section(s) I'm apparently missing? yes ieee754-2008 5.11 i think it is clear: there are tables showing all the predicates and to which "traditional names and symbols" they should map. table 5.1 shows ==, != as quiet comparisions, table 5.2 shows <,> operations as signaling and the text mentions that the quiet operations in table 5.3 are for applications which want to explicitly handle quiet nans that way the text in iso C F.3 is not very detailed about the mapping but gives hints: The relational and equality operators provide IEC 60559 comparisons. IEC 60559 identifies a need for additional comparison predicates to facilitate writing code that accounts for NaNs. The comparison macros (isgreater, isgreaterequal, isless, islessequal, islessgreater, and isunordered) in supplement the language operators to address this need. The islessgreater and isunordered macros provide respectively a quiet version of the <> predicate and the unordered predicate recommended in the Appendix to IEC 60559. the <,> predicates need a quiet version because the default is not quiet, but == and != dont since they are already quiet the precise mapping will be spelled out in more detail in TS 18661, http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1778.pdf see "table - 1 operation binding" (the latest version seems to be password protected, sigh..)