From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from insect.birch.relay.mailchannels.net (insect.birch.relay.mailchannels.net [23.83.209.93]) by sourceware.org (Postfix) with ESMTPS id CE54D3858D37 for ; Thu, 20 Apr 2023 15:22:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CE54D3858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A44885C05AF; Thu, 20 Apr 2023 15:22:26 +0000 (UTC) Received: from pdx1-sub0-mail-a305.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 2F8BF5C1A4D; Thu, 20 Apr 2023 15:22:26 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1682004146; a=rsa-sha256; cv=none; b=kvgr4E8wtSEV1Nr+gERGcKvUeLq6y8GeEr3AngN5vH7vuGO6ijVSPm7yMqZP/T1V4BNB5l lwq9hpyrt5pzsvh/9355nODLuMP857+0+rybPvCELo+pQ5oZHk2zRVC+FOtAmsVAxyJ3Tm RnKL4AItT5EVRwSq3VcEb7R9Srbewak3OaxY9LApxHicGVndoUyNdH7yOxc18r+t7oR8lp UjlrNVPLcbBA4LA6nAGxdsqhWro7d3d9AvSIYkckC9mVBvvIK3SdBXopY2jn5f/u2UE0Zg 0J0VTvTtpK4+FGuTO9aXHk5hjMj+DJFHEPXaj7ikX2TV0wYV+clIubDn3PgMww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1682004146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=6SnncgCbhKaUkQwBOu14t77qSeNkJ/JMXsZ9/ZekkQQ=; b=0u5zoBIOkgv6NgN1roPqvU7LfJLzJWPa6uz8FF/h2bqP5NET/plgsRsCluMrUB8Hz35jT5 wW2GyZsKj0yaMFVvAZlRNpRGsi4XDcgFmSqYnFYpb3f+5ARRwiie7zfgqkclBY7WYj47w7 sWtyMMiyguhnQqNXktYI7093WuleKVx+fR/E1/Q+VMjo2PcnULrOYJBExfnkp2FPVxhBeQ AZ+9Rr3c3R2urM2wr/DJTVQ5s83+MJDDdXe50qejN4pIcv5LG9ZNRiZwe+vKyGJ3XKKaba IwaygrB5mXCMv8ID/sV7+vmsMI6xX6/FAvyXEXUW4S6oWoIkD5VmNwXdceW8Ww== ARC-Authentication-Results: i=1; rspamd-7f66b7b68c-749cf; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Cooing-Tangy: 53a603ec476c3987_1682004146461_1132245680 X-MC-Loop-Signature: 1682004146461:2239302693 X-MC-Ingress-Time: 1682004146460 Received: from pdx1-sub0-mail-a305.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.114.243.17 (trex/6.7.2); Thu, 20 Apr 2023 15:22:26 +0000 Received: from [192.168.0.182] (bras-vprn-toroon4834w-lp130-09-174-91-45-80.dsl.bell.ca [174.91.45.80]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a305.dreamhost.com (Postfix) with ESMTPSA id 4Q2LxY43qVzHb; Thu, 20 Apr 2023 08:22:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1682004146; bh=6SnncgCbhKaUkQwBOu14t77qSeNkJ/JMXsZ9/ZekkQQ=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=iCeYZr1rSd1Afo3HbajwsdMXUs0Ebsm+F5ZciWtQA79NEljSBO0YQ+cPPKZhF3meX szU4BMJaBKyDrfqpweZfp0WIGido4AODnaqltEmRgj+IYaLO5uYdOCLRbVLALBDbHf AnprW+wQeyUwx0J+qSF+3F44OH97Um0W/ggR0Hv8JxTwcNo4/WeBYemF5P3sNBDDwP ILznOyDJMH0+SFSp8FppzfUt74JOnJvPlkVu3ssQ24/u0FBmVLnJ/Iv6Q0KWh9g/Oi mldVOTJsuX/Y2UBRAILmKpOFukQiXgfACFihR65a4O5eLvfAVkBfXQREFtr4ENTYro +SUaGV2TVWozA== Message-ID: Date: Thu, 20 Apr 2023 11:22:24 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] Implement range-op entry for sin/cos. Content-Language: en-US To: Jakub Jelinek Cc: Aldy Hernandez , "Joseph S. Myers" , GCC patches , Andrew MacLeod References: <20230418131250.310916-1-aldyh@redhat.com> From: Siddhesh Poyarekar In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3032.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham 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 2023-04-20 10:02, Jakub Jelinek wrote: > On x86_64-linux with glibc 2.35, I see > for i in FLOAT DOUBLE LDOUBLE FLOAT128; do for j in TONEAREST UPWARD DOWNWARD TOWARDZERO; do gcc -D$i -DROUND=FE_$j -g -O1 -o /tmp/sincos{,.c} -lm; /tmp/sincos || echo $i $j; done; done > Aborted (core dumped) > FLOAT UPWARD > Aborted (core dumped) > FLOAT DOWNWARD > On sparc-sun-solaris2.11 I see > for i in FLOAT DOUBLE LDOUBLE; do for j in TONEAREST UPWARD DOWNWARD TOWARDZERO; do gcc -D$i -DROUND=FE_$j -g -O1 -o sincos{,.c} -lm; ./sincos || echo $i $j; done; done > Abort (core dumped) > DOUBLE UPWARD > Abort (core dumped) > DOUBLE DOWNWARD > Haven't tried anything else. So that shows (but doesn't prove) that > maybe [-1., 1.] interval is fine for -fno-rounding-math on those, but not > for -frounding-math. Would there be a reason to not consider these as bugs? I feel like these should be fixed in glibc, or any math implementation that ends up doing this. I suppose one reason could be the overhead of an additional branch to check for result bounds, but is that serious enough to allow this imprecision? The alternative of output range being defined as [-1.0-ulp, 1.0+ulp] avoids that conversation I guess. Thanks, Sid