delorie.com/archives/browse.cgi | search |
Hi! Peter J. Acklam wrote: >haro AT kgt DOT co DOT 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |