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 C06DB3840C21 for ; Wed, 24 Jun 2020 17:39:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C06DB3840C21 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: XunDgpxZu4lQUg4XHFZ5o41xCnvI6psTMq2G5GPrjJQqmeEfBLaYKP1CQzS+j8nvDeh0TIhA7l kULVBDEvSViX7bOzKT94mhin+fN4sDGrf6+sGUtgAyKHI9t9qk6+buq2zfIaNUXc4X40tR+0g5 GJIP3iMpPof0243cijgrvXhz87WSyFeofSKZ64YxW/B4MEmL+dRTgjFQF0UpSqkAcaqaaxiqs3 eEcVtX1UHdglJQO52+DrgNn2ZeRtSlxIqaER0dj5mnREJcQR2bM2ckgFKq6o2Jy+O6121A7Irk Uko= X-IronPort-AV: E=Sophos;i="5.75,276,1589270400"; d="scan'208";a="52296748" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 24 Jun 2020 09:39:15 -0800 IronPort-SDR: d1w+8bSsNsGBbWNu5Co3dLP9poKrVJsmz2ccOtdeVW6Spwc+g7eWa57i0TmFXydh5rv5D73v// tYBXoqpC1rMzndx+/pWStbSkxs0YbKAoTEq4C2c+PzQqy8MEaYh+qEGpQHjZofk4HuKnfJWCCb M09NcuhwDXujEkEAkKrBSKmCQ7Wp1EsmOuAV5o/RSyFoBDogWJIXoCfgjwjzhNIT2Lb4GC/krv CQ6qxihl/a6iocBcB5AtILAuEbHw3MI6m7StmRc/9WoJw1KdjRiDKjFFNIz4PS86lLhZ006QFm Ek4= Date: Wed, 24 Jun 2020 17:39:10 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Paul Zimmermann CC: Paul E Murphy , Subject: Re: faster expf128 In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) 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-03.mgc.mentorg.com (139.181.222.3) X-Spam-Status: No, score=-3129.8 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_NUMSUBJECT, 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: Wed, 24 Jun 2020 17:39:18 -0000 On Wed, 24 Jun 2020, Paul Zimmermann wrote: > I forgot to say my code is intended mainly for machines that do not provide > hardware float128 support. However I did compare with the glibc > expf128 on gcc135.fsffrance.org (ppc64le GNU/Linux) and below are the > results. You can reproduce them with the code from [1]. We see that > my implementation is about 27% faster, but slightly less accurate > (999585 instead of 999999 correct rounding over 1000000). One caveat > though: I did not find how to efficiently set the inexact flag, thus > it is not set in my code. There is no expectation that most libm functions (other than those such as fma and sqrt that are fully defined by the corresponding IEEE operations) set inexact correctly. (It is necessary to set other exceptions correctly, and the glibc testsuite verifies that; for expf128, that's invalid (for signaling NaNs), overflow and underflow.) -- Joseph S. Myers joseph@codesourcery.com