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:
Danny Milosavljevic 2019-08-27 00:43:37 +02:00 committed by Jan Nieuwenhuizen
parent 3d5557c34a
commit 01ae1994ed
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
4 changed files with 4 additions and 9 deletions

View file

@ -253,12 +253,6 @@ lib/tests/scaffold/a0-call-trunc-int.c
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
XFAIL_TESTS="$XFAIL_TESTS
lib/tests/stdio/70-printf-stdarg.c
@ -272,6 +266,7 @@ lib/tests/mes/90-abtod.c
if test $mes_cpu = x86; then
XFAIL_TESTS="$XFAIL_TESTS
lib/tests/mes/90-dtoab.c
"
fi

View file

@ -29,7 +29,7 @@ dtoab (double d, int base, int signed_p)
long i = (long) d;
char *p = ntoab (i, base, signed_p);
strcpy (dtoa_buf, p);
long f = (d - (double) i) * (double) 100000000000;
long f = (d - (double) i) * (double) 100000000;
if (f)
{
if (f < 0)

View file

@ -28,7 +28,7 @@ main ()
char *p = dtoab (d, 10, 1);
puts (p);
d = -3.141592653589;
d = -3.14159265;
p = dtoab (d, 10, 1);
puts (p);

View file

@ -1,2 +1,2 @@
1.23
-3.14159265358
-3.14159265