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: "vincent+libc at vinc17 dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 18 Apr 2008 07:34:15 -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 vincent+libc at vinc17 dot org 2008-04-18 07:34 -------
(In reply to comment #7)
> No. You never round when the digit is zero.
Hmm, I was assuming that the exact values were taken apart... There seems to be
something missing in the code then. For instance, how does
printf("%1.2f\n", 0.5001);
round the value upward (0.51) in the FE_UPWARD rounding mode? I think you need
some additional flag to say whether the converted value is exact or not, i.e.
whether the remaining digits are all zeros.
--
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.