This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
printf("%.0f", 0.5) and round-to-even
- From: Eric Blake <ebb9 at byu dot net>
- To: newlib at sources dot redhat dot com
- Date: Mon, 29 Sep 2008 21:45:01 +0000 (UTC)
- Subject: printf("%.0f", 0.5) and round-to-even
Based on a report on bug-gnu-utils:
http://lists.gnu.org/archive/html/bug-gnu-utils/2008-09/msg00055.html
It looks like the printf family could use a QoI improvement when dealing with
IEEE round-to-even rules. I'll try and look at making this improvement in the
next few days.
glibc newlib
printf("%.0f",0.5) 0 1
printf("%.0f",1.5) 2 1
printf("%.0f",2.5) 2 2
printf("%.0f",3.5) 4 3
--
Eric Blake