From: SF/projects/mingw n. l. <min...@li...> - 2012-08-08 20:31:39
|
Bugs item #3491001, was opened at 2012-02-22 05:56 Message generated for change (Comment added) made by earnie You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3491001&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: mingw runtime Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: mik (michaelkostylev) Assigned to: Earnie Boyd (earnie) Summary: NAN not recognized by strtod() Initial Comment: Since mingwrt-3.19 strtod() no longer accepts a NAN string as a quiet NaN: % cat > nan.c << __EOF && gcc -std=c99 nan.c -lm && ./a.exe #include <math.h> #include <stdlib.h> #include <stdio.h> int main() { printf("strtod(NAN) = %f, nan('') = %f\n", strtod("NAN", NULL), nan("")); return 0; } __EOF strtod(NAN) = 0.000000, nan('') = nan ---------------------------------------------------------------------- >Comment By: Earnie Boyd (earnie) Date: 2012-08-08 13:31 Message: FYI __strtod() from mingwex now DTRT. I will resolve an issue with the header related to this soon. ---------------------------------------------------------------------- Comment By: Earnie Boyd (earnie) Date: 2012-08-06 07:07 Message: I can resolve strtod to __strtod() in the headers and while the result is better it still isn't correct. Could you or someone else correct the code in mingwex/gdtoa/strtodnrp.c to DTRT? Currently it returns an infinity result instead of a quite NaN result. ---------------------------------------------------------------------- Comment By: Earnie Boyd (earnie) Date: 2012-06-14 05:18 Message: I think this has less to do with the mingwrt version than with the GCC version being used but it is still a bug in mingw runtime none the less. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3491001&group_id=2435 |