GNU bug report logs -
#49368
Guile 3.0.7 test failures on i686-linux, glibc 2.33 [core-updates]
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Sat, 3 Jul 2021 21:42:01 UTC
Severity: important
Done: Maxime Devos <maximedevos <at> telenet.be>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Ludovic Courtès schreef op za 03-07-2021 om 23:41 [+0200]:
> On current ‘core-updates’
> (ca. 39f1486efd70712416ca784f9014132644b04155), Guile 3.0.7,
> specifically (@@ (gnu packages commencement) guile-final) fails tests on
> i686-linux:
>
> --8<---------------cut here---------------start------------->8---
> Running numbers.test
> FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 10/7)
> FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 -10/7)
> FAIL: numbers.test: Number-theoretic division: floor/: mixed types: (130.0 10/7)
> FAIL: numbers.test: Number-theoretic division: floor/: mixed types: (-130.0 -10/7)
> FAIL: numbers.test: Number-theoretic division: ceiling/: mixed types: (130.0 -10/7)
> FAIL: numbers.test: Number-theoretic division: ceiling/: mixed types: (-130.0 10/7)
> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (130.0 10/7)
> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (130.0 -10/7)
> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (-130.0 10/7)
> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (-130.0 -10/7)
> --8<---------------cut here---------------end--------------->8---
>
> Note that this doesn’t happen on ‘master’ (glibc 3.31).
>
> Ludo’.
I wondered if the implementation of the C function 'ceil' is buggy,
so I tried the following (spoiler: 'ceil' doesn't seem to be the issue,
or I need another test case:
Run "guix build --system=i686-linux -e (@@ (gnu packages commencement) guile-final) --keep-failed".
In the build directory, write to a file "test.c":
#include <stdio.h>
#include <math.h>
int
main(void)
{
double x;
double y;
if (scanf("%lf %lf", &x, &y) < 0) /* < 0 is actually incorrect here */
return 1;
if (printf("%lf/%lf=%lf\n", x,y, x/y) < 0)
return 1;
if (printf("ceil(%lf/%lf)=%lf\n", x,y, ceil(x/y)) < 0)
return 1;
return 0;
}
Run ((exact->inexact 10/7) = 1.4285714285714286 on both master and core-updates):
$ gcc -Wall -Wextra -lm test.c -o test
$ echo "130.0 1.4285714285714286" | ./test
130.000000/1.428571=91.000000
ceil(130.000000/1.428571)=91.000000
On master, the output is:
130.000000/1.428571=91.000000
ceil(130.000000/1.428571)=91.000000
(idem)
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 3 years and 298 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.