Bug: atof() can't parse "NaN"

2005-01-06 Thread Roger Leigh
Hi folks, While fixing up glib-2.6.0 to build, I found a failure in the floating-point tests. This is seemingly because atof() is bust. This is a trivial example: /* for NAN and INFINITY */ #define _ISOC99_SOURCE #include #include #include #include #include int main () { double our_na

Re: Bug: atof() can't parse "NaN"

2005-01-06 Thread Shankar Unni
Roger Leigh wrote: our_nan = atof ("NaN"); Which platform does this work on, for you? I wouldn't expect it to "work" (i.e. return a NaN), and I can't get it to work on a Linux (somewhat old, I admit) box either. Or using (hiss!) MSDEV (VC++ 2003 .NET) on a WinXP box. -- Unsubscribe info:

Re: Bug: atof() can't parse "NaN"

2005-01-06 Thread Corinna Vinschen
On Jan 6 13:49, Shankar Unni wrote: > Roger Leigh wrote: > > > our_nan = atof ("NaN"); > > Which platform does this work on, for you? I wouldn't expect it to > "work" (i.e. return a NaN), and I can't get it to work on a Linux > (somewhat old, I admit) box either. Or using (hiss!) MSDEV (VC++