From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 631A33858D28 for ; Thu, 30 Dec 2021 21:45:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 631A33858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: 31l1z5AuCD3CwQ9/LhDU+PgwnpU8y4HFilpStkn0XzpOOPxXiON9fnzYkyMaS7KjFjTcTqbCxI ltKIfwjYAFGkqZo/z7rJSkp+cjiM9Iyo7Pskg+d8RR16TyPGWecVfNq3KGQ0TCA9p8s6iH6qe1 m0pU0ZgwYqJ2eNDaH2DGX5VDdJSED9DM8NTDb+xIts593FQ3clFLW91B9kYi98HPsQ43nGtC9N hr1v5Q7n3DQeBdrCSuDI6MT3MYCLjIGJ5PVYKXnVt0tDb1bL4UFXfU3l/USkhWoMPN000wFJsI zk7d0xr1D/IsQvqY6bNlI1Ii X-IronPort-AV: E=Sophos;i="5.88,248,1635235200"; d="scan'208";a="70109809" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 30 Dec 2021 13:45:11 -0800 IronPort-SDR: 4N+Xv9UYYThG7quF7kuSJrWvV8FY5atJlP3h9jwfrxpnSuLagIOvI0sh0sqekDsqxLPBlvOo+o qplsrcMHcnXo3J0Fe+eBxW8f1b3dt1cNQudWkL/1Lva0xZj5LCVKcMRyclw/tLL2zXN01xFMpz T/yaE5cvcWK3dWULVAcIQLWRz4+CgRSnFVEl6G7hY2hxG5X12watPG0OBDPNGGjVf/7EHh5ZBs MUxSJT3wBOo6V7jARKezhOTrE39qwl+moEZSQ6a3BRIOJ8uKLqnvyOz4F22SqRb7QdasKzM96G jcA= Date: Thu, 30 Dec 2021 21:45:05 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Paul Zimmermann CC: "H.J. Lu" , , Subject: Re: [PATCH 2/2] math: Add X_TLOSSf [BZ #28713] In-Reply-To: Message-ID: References: <20211220231817.4051571-1-hjl.tools@gmail.com> <20211220231817.4051571-2-hjl.tools@gmail.com> <87mtkub6zj.fsf@oldenburg.str.redhat.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-07.mgc.mentorg.com (139.181.222.7) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3115.9 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Thu, 30 Dec 2021 21:45:14 -0000 On Wed, 22 Dec 2021, Paul Zimmermann wrote: > Dear HJ, > > > The v2 patch is at > > > > https://sourceware.org/pipermail/libc-alpha/2021-December/134490.html > > at first glance this looks ok to me, but I did not get an answer to that: > > > > is there a chance that the constant is evaluated at run time? In such a case, > > > could it be that 0x1.921fb54442d180000000p+53f gets different values depending > > > on the rounding mode, in which case we would get back to the gcc12 failures. Floating constants are evaluated in the translation-time rounding mode, which is round-to-nearest unless the FENV_ROUND pragma is used. They are never affected by the dynamic rounding mode. Excess precision applies to floating constants (so when a floating constant is of a type with excess precision, it's evaluated - using the translation-time rounding mode - to a wider evaluation format). Depending on how the constant gets used, it's possible a narrowing to the range and precision of the type could occur at run time using the dynamic rounding mode. This isn't relevant to glibc, given that we don't build with -fexcess-precision=standard and don't currently support _Float16 functions (the case where excess precision is relevant without -fexcess-precision=standard). Even with -fexcess precision=standard, it would only be relevant in cases where a runtime narrowing occurs (constant used for assignment / initialization / argument passing / return). -- Joseph S. Myers joseph@codesourcery.com