From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by sourceware.org (Postfix) with ESMTPS id E2EB53858C20 for ; Mon, 29 Aug 2022 17:07:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E2EB53858C20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-x533.google.com with SMTP id s206so8253313pgs.3 for ; Mon, 29 Aug 2022 10:07:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=mUzE44t0OjtrmG2DIsOwIj3Y9IdNOYUuJ32y9tk0bO0=; b=VJ01G3QoEYCkaf18zw6EKfloLZsyi7cExltQx5ONMcVZLCfeEI/9744oGlc1oO1f8Z SmhW3xUu1hdMZCz4VGsaFNsLuA6qfXADeTDWzTD/cz5PH6B9tUp+xlV18mF9SaAgY+2Y E7NK5SpBC89+mMf+j9KGzOCTwhCKEflxJpY0OQ7W42V15yoTs+q0+RXvjzF+UzWLL1ZJ N5WtAKgBuuA8dSwggiCzrPz9i49/QaRIZ2Gg4NJU55BG/Phken3z7x8HFP7nzOyY7K7Q oC0r38nhHw0FP21mfD3t3jz1Rcti0a9PdlyLtIDBWeVF/+fFE2nTLjCCo/kcaI+vbrax 11ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=mUzE44t0OjtrmG2DIsOwIj3Y9IdNOYUuJ32y9tk0bO0=; b=xgiHn2s/d8wkFpE0sQbXUZVnR6iTPkSTlr9Lzkjx1IYNKNYzZ9Kee0y+HnnYik2Ied TIAR4UOMUvPeLsYXXy+M6dMQTy+hbeOl5YQTURXI45hcnCRJNY9qFdakmuKWtDLZpQcv pYjggRVNKD7aorsZR+m71yViNAoe36LLVPRKTYOJbBFIEAcISKhSQ3vfzFp4op4AaETs bOneodm0GKfKOp0a9XIundzvgORVgMb9puc8rqRfJR8LDbzQcNUawVc0VdmWCYkNN98X rO+Ss56Xwq/zBAFbM2xmipevAuolD1heJW7PbJbkVI1LdpsQe/VRX39Nca4DjdY7Gtnf NtIw== X-Gm-Message-State: ACgBeo3sz/9m+fhxHm0dsTZ8BGBDPRspSrA77a+TBbpp0M30ngWmL+jH gSq2e2JeURVlc7vqtQQ1ZzW/kSUitOY= X-Google-Smtp-Source: AA6agR7mtf5Idxnbz9lh9eBx4Pn41h7LW5wkYGIYfvLs3EGdrjztLd9uGdsu0A62KHxs/XoxVvL4AA== X-Received: by 2002:a63:554a:0:b0:42b:e4a4:ec86 with SMTP id f10-20020a63554a000000b0042be4a4ec86mr6638356pgm.47.1661792861469; Mon, 29 Aug 2022 10:07:41 -0700 (PDT) Received: from [172.31.0.204] (c-73-98-188-51.hsd1.ut.comcast.net. [73.98.188.51]) by smtp.gmail.com with ESMTPSA id q5-20020a170902dac500b0016efa52d428sm7898855plx.218.2022.08.29.10.07.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Aug 2022 10:07:40 -0700 (PDT) Message-ID: <21a88c69-eed3-7b1d-bbb7-15d37e5959fd@gmail.com> Date: Mon, 29 Aug 2022 11:07:39 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH] [ranger] x == -0.0 does not mean we can replace x with -0.0 Content-Language: en-US To: gcc-patches@gcc.gnu.org References: <20220826154606.1155977-1-aldyh@redhat.com> <616b4af5-e3b7-844e-5dcf-a73a5280d114@gmail.com> <825cd304-4844-8708-cfe1-78b142af4f55@moene.org> From: Jeff Law In-Reply-To: <825cd304-4844-8708-cfe1-78b142af4f55@moene.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_NUMSUBJECT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 8/29/2022 9:13 AM, Toon Moene wrote: > On 8/29/22 17:08, Jeff Law via Gcc-patches wrote: > >>> However, I'm hoping to forget as many floating point details, as fast >>> as possible, as soon as I can ;-). > >> Actually FP isn't that bad -- I'd largely avoided it for decades, but >> didn't have a choice earlier this year.  And there's a lot more >> headroom for improvements in the FP space than the integer space IMHO. > > One of the more interesting ones is to try to limit the range of the > input to the trigonometric functions - that way you could use ones > without any argument reduction phase ... The difficult part is that most of the trig stuff is in libraries, so we don't have visibility into the full range. What we do sometimes have is knowledge that the special values are already handled which allows us to do things like automatically transform a division into estimation + NR correction steps (atan2). I guess we could do specialization based on the input range.  So rather than calling "sin" we could call a special one that didn't have the reduction step when we know the input value is in a sensible range. Jeff