printf("%0.0f", 0.5) yields unexpected result (0)

Mo McKinlay mmckinlay@gnu.org
Thu Aug 17 08:22:00 GMT 2000


# Round to next even digit if .5, what's strange about that?

I don't know what school you guys went to, but I was always taught to
round up to the next number, not the next *even* number. I may be being
incredibly stupid, but where on earth did the ISO committee get this
behaviour from? I've never heard of next-even-number-rounding before in my
life :)

[Yah, I know this is veering OT, replies in private mail, etc]

-- 
Mo McKinlay             Chief Software Architect          inter/open Labs
-------------------------------------------------------------------------
GnuPG Key: pub  1024D/76A275F9 2000-07-22 Mo McKinlay <mmckinlay@gnu.org>








More information about the Gcc-bugs mailing list