On Monday 02 June 2008 20:25:28 Will Coleda via RT wrote: > And these are at least in part covered by other tickets (esp. the ones > referring to -0). We should separate out the remaining ones listed here > (assuming you agree with the list). (and I just fixed the trailing space > error, so discount that one.)
Does this patch fix negative 0.0 on Windows? -- c
=== src/string.c ================================================================== --- src/string.c (revision 28044) +++ src/string.c (local) @@ -1958,13 +1958,9 @@ /* Not all atof()s return -0 from "-0" */ if (*p == '-' && FLOAT_IS_ZERO(f)) -#if defined(_MSC_VER) - /* Visual C++ compiles -0.0 to 0.0, so we need to trick - the compiler. */ + /* Some compilers compile -0.0 to 0.0, so trick them */ f = 0.0 * -1; -#else - f = -0.0; -#endif + string_cstring_free(cstr); return f;