-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Bruno Haible on 9/30/2008 4:43 AM: > Does glibc do round-to-even here generally (not just in the one special case > you mentioned?) If so, the module name should be called fprintf-gnu, otherwise > fprintf-posix-ext.
Both glibc and the gnulib *printf replacement already round to nearest; and cygwin 1.5.x failed enough other tests that the gnulib replacement was already selected (as evidenced by the fact that on cygwin, gawk and m4 got different results, because only m4 uses gnulib's replacements). 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 printf("%.0e,0.25) 2e-01 2e-01 printf("%.0e,0.75) 8e-01 7e-01 I suspect %a is also affected, although in newlib's case, %a goes through a different code path than %[efg]. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkjiFVYACgkQ84KuGfSFAYApUQCgmWpFWJ1x5U7I5fpkwJxY5x7O 0ysAoIvy6ZHZQuI5aoyrP0g7qX/0HrTk =FdMJ -----END PGP SIGNATURE-----