From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64649 invoked by alias); 23 Oct 2018 10:38:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 64630 invoked by uid 89); 23 Oct 2018 10:37:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:ubJ5Pej, H*f:sk:4CV1P23, H*i:sk:CAFiYyc, H*f:sk:4ApmEcp X-HELO: EUR04-DB3-obe.outbound.protection.outlook.com Received: from mail-eopbgr60059.outbound.protection.outlook.com (HELO EUR04-DB3-obe.outbound.protection.outlook.com) (40.107.6.59) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 Oct 2018 10:37:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Vvq69kDQMz0RL9462bd3Ub/FlCaoyANJ95UWi/+tWC0=; b=AUFQwSdSU1qAwhsUxqnX+fYEEGiQxirz8rrkcFOpSRdxoSC+mBtUHb1QcQ5MpO5mpvpEXDG8sFV9FTqdwz4rbAXkdnAgkkv0VM3sIlCWWC2WH1fljiziMLR77G6y+qe+zndyzqBaVkyqJKUNv9qD6uzxr3Ly7kT7WCfWX3UohzQ= Received: from DB5PR08MB1030.eurprd08.prod.outlook.com (10.166.14.15) by DB5PR08MB0888.eurprd08.prod.outlook.com (10.164.43.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.20; Tue, 23 Oct 2018 10:37:54 +0000 Received: from DB5PR08MB1030.eurprd08.prod.outlook.com ([fe80::f8ba:6473:782c:1f26]) by DB5PR08MB1030.eurprd08.prod.outlook.com ([fe80::f8ba:6473:782c:1f26%3]) with mapi id 15.20.1250.028; Tue, 23 Oct 2018 10:37:54 +0000 From: Wilco Dijkstra To: Richard Biener , Jeff Law CC: Giuliano Augusto Faulin Belinassi , Segher Boessenkool , GCC Patches , "giuliano.belinassi@gmail.com" , nd Subject: Re: [PATCH] Add sinh(tanh(x)) and cosh(tanh(x)) rules Date: Tue, 23 Oct 2018 11:31:00 -0000 Message-ID: References: <20181019134511.GA1712@gate.crashing.org> <5b717a08-f994-0de8-5092-d11f5d9f8bd0@redhat.com>, In-Reply-To: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2018-10/txt/msg01415.txt.bz2 Hi, >> So I think the runtime math libraries shoot for .5 ULP (yes, they don't >> always make it, but that's their goal).=A0 We should probably have the >> same goal.=A0 Going from 0 to 2 ULPs would be considered bad. Generally the goal is 1ULP in round to nearest - other rounding modes may h= ave higher ULP. The current GLIBC float/double/long double sinh and tanh are 2 = ULP in libm-test-ulps (they can be 4 ULP in non-nearest rounding modes). cosh is 1 ULP in round to nearest but up to 3 in other rounding modes. > But we do that everywhere (with -funsafe-math-optimizations or > -fassociative-math). Exactly. And 2 ULP is extremely accurate for fast-math transformations - mu= ch better than eg. reassociating additions. Wilco