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


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