This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin 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 in /usr/bin/printf "%4.0f\n" 0.1


Hi,
I am using recent Cygwin on WindowsXP professional.
I have found this bug in when using /usr/bin/printf:
If printf "%4.0f" rounds its argument to 0, it only prints 3
characters instead of 4, e.g.:

$ printf "%4.0f\n%4.0f\n" 0 0.1
   0
  0

Can you also see this?
Originally, I have found this problem in gawk, but /usr/bin/printf behaves
in the same way.  I guess the problem is somewhere in the runtime libraries.

HTH,
        Pavol

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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