From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3981 invoked by alias); 29 Sep 2012 11:44:54 -0000 Received: (qmail 3919 invoked by uid 48); 29 Sep 2012 11:44:40 -0000 From: "jsm28 at gcc dot gnu.org" To: glibc-bugs@sources.redhat.com Subject: [Bug math/14645] New: Incorrect sign of inexact zero result from fma Date: Sat, 29 Sep 2012 11:44:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: math X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jsm28 at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2012-09/txt/msg00287.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14645 Bug #: 14645 Summary: Incorrect sign of inexact zero result from fma Product: glibc Version: 2.16 Status: NEW Severity: normal Priority: P2 Component: math AssignedTo: unassigned@sourceware.org ReportedBy: jsm28@gcc.gnu.org Classification: Unclassified Various fma functions produce zero results with incorrect sign in the case where the zero is (underflowing multiplication) + 0. In such a case, IEEE 754-2008 (6.3 The sign bit) explicitly says "the zero result takes the sign of the exact result". But for example fmal (-LDBL_MIN, LDBL_MIN, 0.0L) wrongly returns +0.0L instead of -0.0L on x86 because the implementation adds the -0.0L from the multiplication to the +0.0L, so changing its sign to +0.0L (in round-to-nearest mode). This is the case even after my patch http://sourceware.org/ml/libc-alpha/2012-09/msg00792.html for bug 14638 (signs of *exact* zero results), which doesn't change the relevant code. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.