From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by sourceware.org (Postfix) with ESMTPS id 356933858C60 for ; Mon, 18 Sep 2023 11:12:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 356933858C60 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=ispras.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ispras.ru Received: from [10.10.3.121] (unknown [10.10.3.121]) by mail.ispras.ru (Postfix) with ESMTPS id BE57B40755DF; Mon, 18 Sep 2023 11:12:29 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru BE57B40755DF Date: Mon, 18 Sep 2023 14:12:29 +0300 (MSK) From: Alexander Monakov To: Florian Weimer cc: Richard Biener , gcc@gcc.gnu.org Subject: Re: Concerns regarding the -ffp-contract=fast default In-Reply-To: <877condc69.fsf@oldenburg.str.redhat.com> Message-ID: References: <87r0n01z18.fsf@oldenburg3.str.redhat.com> <21e46cef-1fbf-df87-608d-52b7f894dea7@ispras.ru> <877condc69.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, 18 Sep 2023, Florian Weimer via Gcc wrote: > x - x is different because replacing it with 0 doesn't seem to be a > valid contraction because it's incorrect for NaNs. x + x - x seems to > be different in this regard, but in our implementation, there might be a > quirk about sNaNs and qNaNs. Sorry, do you mean contracting 'x + x - x' to 'x'? That is not allowed due to different result and lack of FP exception for infinities. Contracting 'x + x - x' to fma(x, 2, -x) would be fine. Alexander