Mail Archives: djgpp-workers/2002/12/18/01:14:54
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.)
- Raw text -