Subject: Re: bug#49368: Guile 3.0.7 test failures on i686-linux, glibc 2.33 [core-updates]

From: Maxime Devos <[email-masked]>
Date: Sun, 04 Jul 2021 14:06:20 +0200

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).

In a REPL:

(euclidean/ 130.0 10/7)
(euclidean/ 130.0 -10/7)
(floor/ 130.0 10/7)
(floor/ -130.0 -10/7)
(ceiling/ 130.0 -10/7)
(ceiling/ -130.0 10/7)
(truncate/ 130.0 10/7)
(truncate/ 130.0 -10/7)
(truncate/ -130.0 10/7)
(truncate/ -130.0 -10/7)

Output on core-updates (using --keep-failed and ./meta/uninstalled-env guile):

scheme@(guile-user)> (euclidean/ 130.0 10/7)
$1 = 90.0
$2 = 1.4285714285714257
scheme@(guile-user)> (euclidean/ 130.0 -10/7)
$3 = -90.0
$4 = 1.4285714285714257
scheme@(guile-user)> (floor/ 130.0 10/7)
$5 = 90.0
$6 = 1.4285714285714257
scheme@(guile-user)> (floor/ -130.0 -10/7)
$7 = 90.0
$8 = -1.4285714285714257
scheme@(guile-user)> (ceiling/ 130.0 -10/7)
$9 = -90.0
$10 = 1.4285714285714257
scheme@(guile-user)> (ceiling/ -130.0 10/7)
$11 = -90.0
$12 = -1.4285714285714257
scheme@(guile-user)> (truncate/ 130.0 10/7)
$13 = 90.0
$14 = 1.4285714285714257
scheme@(guile-user)> (truncate/ 130.0 -10/7)
$15 = -90.0
$16 = 1.4285714285714257
scheme@(guile-user)> (truncate/ -130.0 10/7)
$17 = -90.0
$18 = -1.4285714285714257
scheme@(guile-user)> (truncate/ -130.0 -10/7)
$19 = 90.0
$20 = -1.4285714285714257

It appears that truncate/, ceiling/ and floor/ give the same output ...
that doesn't seem correct.

Greetings,
Maxime.