From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 55C251F4B6 for ; Wed, 26 Jun 2019 19:59:36 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=SFRb KHlH32RDxlaqwxFUiCq7cgo4ObXboJOI7TQDz8OijTVBt1J6TI+ow5nBa61b90tk Uwus2n75E3J5oLbeXrkxlfb4bYTjwRejfm6Ma2vZAjpYVECACL9QSD+DARgtb5uj eBSpf06vvZlQg0voNwim+c/nJY9Rz15/yyBrZ7M= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=BrKdRT4/vu VzcPpaz33k2KuINOM=; b=bdWEMig60OaFM7vpZwA4Nuw0OUHmdnYG1OiDS1pNZj bX/HmuZUjWT5jUpeWftNh8d7LmCq7HZ9vjCv3YwORN/o0r37E3SMGzT4iItYjbMN DIxSDDcDpokQulj7sPKtumrZXjYL1dNbiW1tsstNjvLZHr+xcx7ih/Phei/oTUtB c= Received: (qmail 43037 invoked by alias); 26 Jun 2019 19:59:33 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 43028 invoked by uid 89); 26 Jun 2019 19:59:32 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: smtpout1.mo803.mail-out.ovh.net Date: Wed, 26 Jun 2019 16:59:25 -0300 From: "Gabriel F. T. Gomes" To: Adhemerval Zanella CC: Subject: Re: [PATCH 24/28] powerpc: hypot refactor and optimization Message-ID: <20190626195925.kpvfzjk7kcjwb3mg@tereshkova> References: <20190329133529.22523-1-adhemerval.zanella@linaro.org> <20190329133529.22523-25-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20190329133529.22523-25-adhemerval.zanella@linaro.org> User-Agent: NeoMutt/20180716 X-Ovh-Tracer-Id: 14889181846619475657 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrudeigddugeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm On Fri, Mar 29 2019, Adhemerval Zanella wrote: > > - Two reduntant checks (for y == 0 and y > two60factor && (x / y) > two60) ~~~~~~ I don't understand why y == 0 is redundant. It looks like an optimization as much as the check for x > y * 0x1p+60. Should we actually remove the check for y == 0? > * sysdeps/powerpc/fpu/e_hypot.c (two60, two500, two600, two1022, > twoM500, twoM600, two60factor, pdnum): Remove. > (TEST_INFO_NAN): Remove macro. Missing mention to the removal of GET_TW0_HIGH_WORD? > - if (y == 0.0) > - return x; As mentioned above, is it actually redundant? > + if (y <= 0x1.fffffffffffffp+963 && x > (y * 0x1p+60)) > + return x + y; OK. Will not overflow. Other than that the patch looks good to me. Reviewed-by: Gabriel F. T. Gomes