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 7308939B5C7F; Fri, 20 Aug 2021 16:56:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7308939B5C7F 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: YZ/INz2ih1VL+IkwDSCdW6FN7ViOnwvKLTvA8OoHRg1OQKpsczUflVNaBkdBOdPlA5rttdZf/A U1S4/ItVqds7MOW4rhovxtp1Bfit68nvrD2QELKFLNMFmX9Jx+9iKq+58v26+JDFbvJW187j0K tSf214AUPwCIpM1q/Lw0YKg1eaVwnPdqLc7IUfA/gpSNWMochhf2GMfQm2frvbucZoXSsfhjOx +0pBrB3cMXYkBY2w+vskZAmc9RFx6JcsR8R0lAKwTaLupq7UnMZ7OVo4TPDceBYYlA/th62GPC drMUKtapcSNLBWTnp4PhYBGh X-IronPort-AV: E=Sophos;i="5.84,338,1620720000"; d="scan'208";a="67438805" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 20 Aug 2021 08:56:05 -0800 IronPort-SDR: xCsCwCZ9TULYN/6+Rp6SZtgpjfRZr2QljUhp/L5y7x7s6jQHaG4ritdOa/ni2fZNErB9/VtIVG D3Jn4ZAb7ofDWVq1DSwtm0I6BzLCrHK9ugCMke7cjqJk0L1lqYhMokj6V87Xd9WyON1dkvxz8b K9SSU3p0XHpa58dz5AAWRYcX++V6dPzDPlI5fV+j2I6AZ1PsO3HfwuANrSnQT5peSf1rPISsqT t7UEzvZT3VvDPeABx+4P6A6+icpmGNy0sL/ePCVA1x+ZW8zM+8nas2xxATL/FaSaH3anSPk6X3 eaU= Date: Fri, 20 Aug 2021 16:55:59 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Stefan Kanthak CC: Szabolcs Nagy , Adhemerval Zanella , , Subject: Re: [PATCH/2nd version] Re: nextafter() about an order of magnitude slower than trivial implementation In-Reply-To: Message-ID: References: <20210818125119.GH25257@arm.com> <741b2c48-a754-51c5-cb72-a2f97795e30f@linaro.org> 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=-3119.0 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-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 16:56:07 -0000 On Fri, 20 Aug 2021, Stefan Kanthak wrote: > if(ax > 0x7ffull << 53) /* x is nan */ > return x; > if(ay > 0x7ffull << 53) /* y is nan */ > return y; How has this been tested? I'd have expected it to fail the nextafter tests in the glibc testsuite (libm-test-nextafter.inc), because they verify that sNaN arguments produce a qNaN result with the "invalid" exception raised, and this looks like it would just return an sNaN argument unchanged. -- Joseph S. Myers joseph@codesourcery.com