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/10089] New: rintf() in sysdeps/ieee754/flt-32/s_rintf.c makes wrong rounding of 2097152.75


rintf(2097152.75) returns 2097152, which is wrong. It should be 2097153.

2097152.75 = 0x1.000006p+21 = 0b1000000000000000000000.11, which after rounding
should be 0b1000000000000000000001, which is 0x1.000008p+21 = 2097153

The behavior is shown by the __rintf function "ripped" from the glibc-20090420
snapshot.

-- 
           Summary: rintf() in sysdeps/ieee754/flt-32/s_rintf.c makes wrong
                    rounding of 2097152.75
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: math
        AssignedTo: aj at suse dot de
        ReportedBy: kononov at ftml dot net
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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