bug in atof
Louis. Lenders
xerox_xerox2000 at yahoo.co.uk
Sat Jan 21 06:11:19 CST 2006
Hi, i filed a bug ( bug 4337) and looks like there's a
bug in atof. Is there a difference between linux' atof
and msvcrt's one? Even following simple program (from
msdn) yields wrong results:
// crt_atof.c
#include <stdlib.h>
#include <stdio.h>
int main( void )
{
char *s; double x; int i; long l;
s = " -2309.12E-15"; /* Test of atof */
x = atof( s );
printf( "atof test: \"%s\"; float: %e\n", s, x );
s = "7.8912654773d210"; /* Test of atof */
x = atof( s );
printf( "atof test: \"%s\"; float: %e\n", s, x );
s = " -9885 pigs"; /* Test of atoi */
i = atoi( s );
printf( "atoi test: \"%s\"; integer: %d\n", s, i );
s = "98854 dollars"; /* Test of atol */
l = atol( s );
printf( "atol test: \"%s\"; long: %ld\n", s, l );
}
the exponent value in float x are wrong. Thanks
___________________________________________________________
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com
More information about the wine-devel
mailing list