Can't get a NaN from the MSVCRT strtod/sscanf/atof functions
问题 Is there any way to get NaN s from the Windows CRT string to float functions? Why: I'm writing an IEEE float to string converter in C with no information loss ( strtod , sscanf or atof return the original float ) provided the rounding mode doesn't change. I'm under MinGW or Visual C++, so these calls go to the MSVC++ runtime. The problem is that I can't get it to parse any special values (like "Inf" or "NaN" ). Inf is OK (it's returned after parsing a value that doesn't fit in a float , such