public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/15485] New: remainder incorrect in directed rounding modes
@ 2013-05-17 16:34 jsm28 at gcc dot gnu.org
  2013-05-17 19:05 ` [Bug math/15485] " jsm28 at gcc dot gnu.org
  2014-06-13 17:44 ` fweimer at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2013-05-17 16:34 UTC (permalink / raw)
  To: glibc-bugs

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

             Bug #: 15485
           Summary: remainder incorrect in directed rounding modes
           Product: glibc
           Version: 2.17
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jsm28@gcc.gnu.org
    Classification: Unclassified


The result of the remainder function is fully specified by ISO C and is
supposed to be independent of the rounding mode.  However, on x86_64, remainder
(3.0, 2.0) gives the correct result (-1) in FE_TONEAREST mode, but incorrect +1
in FE_DOWNWARD and FE_TOWARDZERO modes.  remainder (5.0, 2.0) should be +1, but
is incorrectly -1 in FE_UPWARD mode.  So only FE_TONEAREST mode appears to get
the right results.

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-17 16:34 [Bug math/15485] New: remainder incorrect in directed rounding modes jsm28 at gcc dot gnu.org
2013-05-17 19:05 ` [Bug math/15485] " jsm28 at gcc dot gnu.org
2014-06-13 17:44 ` 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).