Fix dtoab.
* lib/mes/dtoab.c (dtoab): Fix it. * lib/tests/mes/90-dtoab.c (main): Fix test. * build-aux/check-mescc.sh (XFAIL_TESTS: Remove it.
This commit is contained in:
parent
3d5557c34a
commit
01ae1994ed
|
@ -253,12 +253,6 @@ lib/tests/scaffold/a0-call-trunc-int.c
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $mes_cpu = x86; then
|
|
||||||
XFAIL_TESTS="$XFAIL_TESTS
|
|
||||||
lib/tests/mes/90-dtoab.c
|
|
||||||
"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $mes_cpu = x86_64; then
|
if test $mes_cpu = x86_64; then
|
||||||
XFAIL_TESTS="$XFAIL_TESTS
|
XFAIL_TESTS="$XFAIL_TESTS
|
||||||
lib/tests/stdio/70-printf-stdarg.c
|
lib/tests/stdio/70-printf-stdarg.c
|
||||||
|
@ -272,6 +266,7 @@ lib/tests/mes/90-abtod.c
|
||||||
|
|
||||||
if test $mes_cpu = x86; then
|
if test $mes_cpu = x86; then
|
||||||
XFAIL_TESTS="$XFAIL_TESTS
|
XFAIL_TESTS="$XFAIL_TESTS
|
||||||
|
lib/tests/mes/90-dtoab.c
|
||||||
"
|
"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ dtoab (double d, int base, int signed_p)
|
||||||
long i = (long) d;
|
long i = (long) d;
|
||||||
char *p = ntoab (i, base, signed_p);
|
char *p = ntoab (i, base, signed_p);
|
||||||
strcpy (dtoa_buf, p);
|
strcpy (dtoa_buf, p);
|
||||||
long f = (d - (double) i) * (double) 100000000000;
|
long f = (d - (double) i) * (double) 100000000;
|
||||||
if (f)
|
if (f)
|
||||||
{
|
{
|
||||||
if (f < 0)
|
if (f < 0)
|
||||||
|
|
|
@ -28,7 +28,7 @@ main ()
|
||||||
char *p = dtoab (d, 10, 1);
|
char *p = dtoab (d, 10, 1);
|
||||||
puts (p);
|
puts (p);
|
||||||
|
|
||||||
d = -3.141592653589;
|
d = -3.14159265;
|
||||||
p = dtoab (d, 10, 1);
|
p = dtoab (d, 10, 1);
|
||||||
puts (p);
|
puts (p);
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
1.23
|
1.23
|
||||||
-3.14159265358
|
-3.14159265
|
||||||
|
|
Loading…
Reference in a new issue