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 libc/5044] printf doesn't take the rounding mode into account


------- Additional Comments From eberlein at us dot ibm dot com  2008-04-18 20:57 -------
Created an attachment (id=2713)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=2713&action=view)
Revised patch to allow printf_fp to get rounding mode using _FPU_GETCW

Vincent, I see what you mean about taking into account whether the rounded
digit is followed by zeroes.  Rounding upward should never result in a value
that is less than the original value, which wasn't caught when the rounded
digit is zero followed by nonzero digits.  I'm attaching a patch that modifies
the existing ties-to-even code to work for FE_UPWARD and FE_DOWNWARD that
checks for trailing zeroes when the rounded digit is zero.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #2706 is|0                           |1
           obsolete|                            |


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

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