This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/14645] New: Incorrect sign of inexact zero result from fma


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]