2010/11/1 Sisyphus <[email protected]>:
> Hi,
>
> The demo:
>
> ##############################
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(void) {
> double x;
> char * ptr;
>
> x = strtod("nan", &ptr);
> printf("%f\n", x);
>
> x = strtod("INf", &ptr);
> printf("%f\n", x);
>
> return 0;
> }
> ##############################
>
> With the mingw.org compilers that I've tested, the output of that program
> is:
>
> -1.#IND00
> 1.#INF00
>
> But, on the same machine, with the mingw64 compilers that I've tested, the
> output is:
>
> 0.000000
> 0.000000
>
> Why the difference ?
>
> Cheers,
> Rob
Hi Rob,
the difference is that we are exporting for strtod the msvcrt function
and do not redirect to the internal c99 version of __strtod. If you
use here __strtod instead, you will get c99 compatible behavior.
Regards,
Kai
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public