public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/14638] New: fma produced wrong results for (0 * -1.0) + -0.0
@ 2012-09-27 20:45 law at redhat dot com
  2012-09-29 18:34 ` [Bug math/14638] " jsm28 at gcc dot gnu.org
  2014-06-17  4:17 ` fweimer at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: law at redhat dot com @ 2012-09-27 20:45 UTC (permalink / raw)
  To: glibc-bugs


http://sourceware.org/bugzilla/show_bug.cgi?id=14638

             Bug #: 14638
           Summary: fma produced wrong results for (0 * -1.0) + -0.0
           Product: glibc
           Version: 2.17
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
        AssignedTo: unassigned@sourceware.org
        ReportedBy: law@redhat.com
    Classification: Unclassified


The FMA implementation in sysdeps/ieee754/dbl-64/s_fma.c produces the wrong
result for this program when run on a x86_64 box that doesn't have fma3/fma4
support.

#include <assert.h>
#include <math.h>
#include <stdlib.h>


int main (void) {
  double f1 = 0.0f;
  double f2 = -1.0f;
  double f3 = -0.0f;

  double dresult = fma (f1, f2, f3);

  if (! signbit (dresult))
    abort ();
  exit (0);
}

-- 
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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug math/14638] fma produced wrong results for (0 * -1.0) + -0.0
  2012-09-27 20:45 [Bug math/14638] New: fma produced wrong results for (0 * -1.0) + -0.0 law at redhat dot com
@ 2012-09-29 18:34 ` jsm28 at gcc dot gnu.org
  2014-06-17  4:17 ` fweimer at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-09-29 18:34 UTC (permalink / raw)
  To: glibc-bugs


http://sourceware.org/bugzilla/show_bug.cgi?id=14638

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Joseph Myers <jsm28 at gcc dot gnu.org> 2012-09-29 18:34:30 UTC ---
Fixed for 2.17 by:

commit 8ec5b01346114da38e806ca1867da688d3a360e2
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Sat Sep 29 18:31:54 2012 +0000

    Fix sign of exact zero return from fma (bug 14638).

-- 
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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug math/14638] fma produced wrong results for (0 * -1.0) + -0.0
  2012-09-27 20:45 [Bug math/14638] New: fma produced wrong results for (0 * -1.0) + -0.0 law at redhat dot com
  2012-09-29 18:34 ` [Bug math/14638] " jsm28 at gcc dot gnu.org
@ 2014-06-17  4:17 ` fweimer at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2014-06-17  4:17 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=14638

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-17  4:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-27 20:45 [Bug math/14638] New: fma produced wrong results for (0 * -1.0) + -0.0 law at redhat dot com
2012-09-29 18:34 ` [Bug math/14638] " jsm28 at gcc dot gnu.org
2014-06-17  4:17 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).