This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Printf prints NaN for -Inf


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]