From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6517 invoked by alias); 5 Nov 2014 14:34:45 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 6470 invoked by uid 48); 5 Nov 2014 14:34:40 -0000 From: "vogt at linux dot vnet.ibm.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug go/63269] libgo/math test failures in TestLog2 Date: Wed, 05 Nov 2014 14:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: go X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vogt at linux dot vnet.ibm.com X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ian at airs dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-11/txt/msg00273.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63269 --- Comment #4 from Dominik Vogt --- regarding 2) > I'm not entirely persuaded by your argument for item 2. ... Hm, good that you doubted it, because the actual mistake is somehwere else: The unpatched code has if l != float64(i) but if you want to use a tolerance here this must become if !veryclose(float64(i), l) { With the argument reversed. This could/should be cleaned up by renaming the arguments of the tolerance() function, e.g. a -> expected, b -> result, e -> maxerr. > Zero is a special > value. When we expect a zero, we should get a zero, not something close to > zero. I don't think this change is correct in general. It may be correct for > some specific cases, but then we need to investigate those. Actually, this has nothing to do with 0 being special here, abut with scaling of the allowed error: Multiplying it by 0 yields zero error tolerance, so the tolerance() function does not do that. --> This chunk is not necessary, but a (separate) cleanup patch might help to avoid future confusion.