Date: Wed, 18 Dec 2002 08:07:06 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Richard Dawe cc: djgpp-workers AT delorie DOT com Subject: Re: strtof (C99) [PATCH] In-Reply-To: <3DFFC69E.693C6E55@phekda.freeserve.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 18 Dec 2002, Richard Dawe wrote: > > > Test 6: Inf -> 0 > > > > Why doesn't this return an Inf (the float representation of it)? > > Because strtof does not parse Inf. strtod and strtold do not either. Does that mean our printf can generate Inf and NaN, but our scanf cannot read them? Oops! > C99 requires strto* to understand Inf and NaN (and other capitalisations). I > think we can fix those problems in another round of C99-compliance work. I think we should indeed fix that. How about adding this to TODO? > > Also, what about a NaN? > > I can add a test for NaNs, if that's what you are asking. Yes. If we don't support converting Inf, we probably don't support NaN either, so this is also something to be fixed, IMHO. (There's also the new C99 complication with NaN-0xFFFFFF.... thingie.)