Printf prints NaN for -Inf
Peter Kabal
kabal@ECE.McGill.CA
Tue Nov 12 06:59:00 GMT 2002
I am running gcc 3.2 under Cygwin. I am told that the printf routine
comes from newlib.
The function call log(0) returns the bit pattern for -Inf, but if this
value is given to printf, the printout says "NaN". [printf ("%g\n",
log(0)];
Peter Kabal Kabal@ECE.McGill.CA (514) 398-7130
Electrical & Computer Engineering (514) 398-4470 (FAX)
McGill University
3480 University, Montreal, Quebec, Canada H3A 2A7
More information about the Newlib
mailing list