[uClibc] uClibc strtod() does not work well when I enabled
soft-float.
Hiroshi Ito
ito at mlb.co.jp
Sat Nov 6 16:51:59 UTC 2004
Hello, I'm new to this mailling list.
when I set SOFT_FLOAT to true in toolchains Makefile,
Any string passed to strtod will be nan, until I use double
constant value.
for example.
# cat a.c
#include <stdio.h>
#include <stdlib.h>
int main( int argc, char *argv[] )
{
double a;
printf( "%f\n", strtod( "1.0", NULL ) );
printf( "%f\n", strtod( "1.0", NULL ) );
a=1.0;
printf( "%f\n", strtod( "1.0", NULL ) );
printf( "%f\n", strtod( "1.0", NULL ) );
}
compile as
gcc-3.3.x/toolchain_mipsel_nofpu/bin/mipsel-linux-gcc \
-static -o a a.c
# ./a
nan
nan
1.000000
1.000000
#
gcc-3.3.x/toolchain_mipsel/bin/mipsel-linux-gcc -static -o a a.c
# ./a
1.000000
1.000000
1.000000
1.000000
My system is
CPU NEC VR4131 (it does not have FPU, and it has MMU )
BOARD TANBAC TB0226
linux 2.4.21-pre4
toolchain @uclibc.org:/var/cvs/toolchain/gcc-3.3.x/
uClibc uClibc-snapshot at 2004 Nov 6 16:11 JST+9
--------
Hiroshi Ito
Media Lab. Inc.,
URL http://www.mlb.co.jp ( Sorry, Japanese only. )
TEL +81-3-5294-7255 FAX +81-3-5294-7256
More information about the uClibc
mailing list