This is the mail archive of the cygwin 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]

Re: Bug in printf ?


Hi!


Peter J. Acklam wrote:


haro@kgt.co.jp wrote:



::How come "0.125" gets printed as "0.12", and not "1.3"?
^^^ "0.13", off cource ;-)



Dealing with integers illustrates the matter more clearly. When
the decimal value is exactly 0.5, then printf should round to the
nearest *even* integer, as far as I know, so you should get


Never heard of such a rule!
As I learned it in school, 0.5 should allways be rounded to 1 .


Bye, Peter WOTLmade

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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]