From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id E07AA3890435 for ; Tue, 23 Feb 2021 19:34:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E07AA3890435 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=joseph_myers@mentor.com IronPort-SDR: UFUFXO3sKjGySqX+TyQqZr2bkR9AxcHP5ut88weRyqM+d7ld+T6aTYSZGmcY0/XuPy5ZY9GMpx 59Iyjte1NSaUNFbMes6RdW7sYu+jnpxl6xT1YRhneNtR+erXtSQ9cy5miBK+5GV/N5hXoQPaxm bkvIfntdtNPJMbvvG0Yj1mfP+BxSBOTbPr//vuzPLMjLi5WCYkblqW5e+8YHIwtNZ5A0IltyBF rhmH0iZP4rTwL6gvyvfZ84I2aRFM+8kflOPu8qYdGiC3LwQJPW81BlXlaylYzc5gHu5j7eAN7k mds= X-IronPort-AV: E=Sophos;i="5.81,200,1610438400"; d="scan'208";a="60731073" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 23 Feb 2021 11:34:22 -0800 IronPort-SDR: oX+ZNXwRFkwiJqA4Nsvd0TpiTZP9umzLGCdQZr71gm+bFkcfxjQ4XBE1zmn4Yob7qAZXf8FoNC 1NLDxkI5/kutUB+a+kTvOEKoIo8ttOJrYEfbNZBAoyqsINvALNjQmey3GvYHg+Boi3uk+ifnn+ 10A4gWA6kADQKkdiA+RCrShvg0mxQ1RmzjpkK/DHms/FQgq7SFIFAbCrgBEKiz7nro9N1h3swk RXPSSWva3eLkVRyTnckvNn2bdRjSLePpZ70CxZ6EBfZwdltKxbL13qwR34w3GBCSI/blo1tOxB J4Y= Date: Tue, 23 Feb 2021 19:34:16 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Michael Morrell CC: Paul Zimmermann , "libc-alpha@sourceware.org" Subject: RE: Fix the inaccuracy of j0f/y0f/j1f/y1f In-Reply-To: <2b47fb0947b34fcb9c963cb46b453876@tachyum.com> Message-ID: References: <6cf8704bcd9a45ac82cf23f05aab68a6@tachyum.com> <2b47fb0947b34fcb9c963cb46b453876@tachyum.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3123.1 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 19:34:25 -0000 On Tue, 23 Feb 2021, Michael Morrell wrote: > Paul, > > You state that the IEEE 754 standard doesn't require correct rounding, > but I don't see where it says that. I see Section 9.2 ("Additional > mathematical operations") and the list in Table 9.1 which seems to > include most of the math functions in glibc (I notice that the Bessel > functions like y0 aren't included) and these all must be correctly > rounded. I agree that a language may choose not to define all of the > operations in 9.1, but that doesn't seem to give it the right to > implement the function inaccurately. If you look at the current C2x draft N2596, 5.2.4.2.2 paragraph 8 says that the accuracy of the library functions is implementation-defined. Annex F says how C operations relate to operations defined in IEEE 754; the table in F.3 paragraph 1 includes an entry for sqrt, for example, so that corresponds to the IEEE squareRoot operation, but doesn't include most of the math.h functions; paragraph 20 gives the mapping for other functions and says that correct rounding is not required. -- Joseph S. Myers joseph@codesourcery.com