printf("%.0f", 0.5) and round-to-even
Eric Blake
ebb9@byu.net
Wed Oct 1 13:28:00 GMT 2008
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
More information about the Newlib
mailing list