From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43126 invoked by alias); 16 Oct 2018 20:39:15 -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 43114 invoked by uid 89); 16 Oct 2018 20:39:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=outputs X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 Oct 2018 20:39:14 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B1CCC90C87; Tue, 16 Oct 2018 20:39:12 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-46.rdu2.redhat.com [10.10.112.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 897255C2E1; Tue, 16 Oct 2018 20:39:11 +0000 (UTC) Subject: Re: [PATCH] Add sinh(tanh(x)) and cosh(tanh(x)) rules To: Giuliano Augusto Faulin Belinassi Cc: GCC Patches , Paul Koning References: <1a9f1bf8-cb6a-41e3-e13f-d7743bc16dcb@redhat.com> From: Jeff Law Openpgp: preference=signencrypt Message-ID: <6315400f-4ee5-2402-2808-7c6cb04b71d6@redhat.com> Date: Tue, 16 Oct 2018 21:16:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg01000.txt.bz2 On 10/12/18 8:36 AM, Giuliano Augusto Faulin Belinassi wrote: > Hello. > I don't think there is a need for overflow handling here because > the argument is bound by the argument of the sqrt function :-) Yea, I guess you're right. The domain of arctanh is -1 to 1, so I guess we're safe there. Except for the case where the input is -1 or 1 in which case I think you just set the output to +- INF as appropriate. Hmm, do we have problems as we get close to -1 or 1 where the outputs of the two forms might diverge? Jeff