Re: Printf routine incorrectly prints NaN for -Inf
On Mon, Nov 11, 2002 at 10:11:57PM -0500, Peter Kabal wrote: >gcc version 3.2 20020818 (prerelease) > >printf ("%g", log(0)); > >This prints "NaN" instead of "-Inf" as it should (and did in the past). >A check of the bit pattern returned shows that that log(0) returns a bit >pattern corresponding to "-Inf", but printf prints "NaN" instead. > >I am not sure which C library is being used (a bug report to gcc folks >got the response that newlib is the culprit). However, the compiler >option -print-libgcc-file-name tells me it is looking for libgcc.a. So I >am confused as to who to report the bug to. Perhaps unsurprisingly, the gcc folks are correct. It's a newlib bug. The newlib mailing list is newlib at sources dot redhat dot com . cgf -- 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/
Printf routine incorrectly prints NaN for -Inf
gcc version 3.2 20020818 (prerelease) printf ("%g", log(0)); This prints "NaN" instead of "-Inf" as it should (and did in the past). A check of the bit pattern returned shows that that log(0) returns a bit pattern corresponding to "-Inf", but printf prints "NaN" instead. I am not sure which C library is being used (a bug report to gcc folks got the response that newlib is the culprit). However, the compiler option -print-libgcc-file-name tells me it is looking for libgcc.a. So I am confused as to who to report the bug to. Peter Kabal [EMAIL PROTECTED] (514) 398-7130 Electrical & Computer Engineering (514) 398-4470 (FAX) McGill University 3480 University, Montreal, Quebec, Canada H3A 2A7 -- 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/