This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/5044] printf doesn't take the rounding mode into account
- From: "eberlein at us dot ibm dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 18 Apr 2008 20:57:31 -0000
- Subject: [Bug libc/5044] printf doesn't take the rounding mode into account
- References: <20070919134419.5044.vincent+libc@vinc17.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- 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.