Eric Blake <[EMAIL PROTECTED]> wrote: > An interesting question popped up on the bug-gnu-utils list: > http://lists.gnu.org/archive/html/bug-gnu-utils/2008-09/msg00055.html > > POSIX states that with %f, the low-order digit is rounded in an > implementation- > defined manner. However, since 0.5 is exactly half-way between 0 and 1, and > most machines default to IEEE round-to-even, should we make the gnulib printf- > posix check enforce that printf("%.0f", 0.5) outputs "0" per round-to-even > rules? If so, then at least cygwin 1.5.x fails this check, by outputting "1".
That sounds like the right way to go.