SV: Bug in printf ?

Brian Dessent brian@dessent.net
Thu Jun 30 16:47:00 GMT 2005


Dave Korn wrote:

>   Absolutely, there's a rounding error of some sort.  Compare the difference
> when compiling the testcase with -mno-cygwin (i.e. using mingw maths lib):

Isn't this just a case of the Cygwin math library choosing "round to
even" and the MSVCRT/mingw library choosing "0.5 always rounds up"?  The
Goldberg paper covers this, and in fact it claims the IEEE standard
requires round to even for all results of addition, subtraction,
multiplication, and division.  Sooo, doesn't look like a bug at all to
me.

Brian

--
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/



More information about the Cygwin mailing list