From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C18F5384FB5F; Fri, 3 Mar 2023 13:03:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C18F5384FB5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677848611; bh=fsBVUjP7fBCxF8LT49LudetcbO8YaTBS0Y5krawUbj0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gPb9u7t/RLsbe6ScZaiG1VUZ76p0wLKcZqFR9uL1w6c+wJhrcyICn5xW7CkedXsIy kslw3odHk/q6NFIm+GZHF4myiqJUBgGQoPXDcC3W5VTq/AHZlH3+1OJgPpKTUaJNvc HEhMAOJzBiT4DVTUuzAZSE7Q9DKmXA6pw6gSPsbA= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109008] [13 Regression] Wrong code in scipy package since r13-3926-gd4c2f1d376da6f Date: Fri, 03 Mar 2023 13:03:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109008 --- Comment #7 from Richard Biener --- (In reply to Jakub Jelinek from comment #6) > Note, the ulps frange_arithmetic are ulps of the result, result is in this > case 0.0, > so 1ulp is the smallest subnormal number. > That is something completely different from what we need here though for = the > reverse > operations. > [1.0, 1.0] + x =3D=3D [1.0, 1.0] is true with round to nearest for x in > [-0x1.0p-54, 0x1.0p-53], so that is ulp of 1.0, not the result. > Now, is this problem just around the 0 result or other values too? > Say [1.0, 1.0] + x =3D=3D [2.0, 2.0]? Consider [1.0, 1.0] + x =3D=3D [1.00001, 1.00001] I think that we need to adjust x here as well, it's not just [0.00001, 0.00001] with an ulp of that result but it's a wider range adjusted by the "biggest" ulp of the input ranges?=