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/15485] New: remainder incorrect in directed rounding modes


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.


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