all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#49368: Guile 3.0.7 test failures on i686-linux, glibc 2.33 [core-updates]
@ 2021-07-03 21:41 Ludovic Courtès
  2021-07-04 12:06 ` Maxime Devos
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ludovic Courtès @ 2021-07-03 21:41 UTC (permalink / raw)
  To: 49368

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#49368: Guile 3.0.7 test failures on i686-linux, glibc 2.33 [core-updates]
  2021-07-03 21:41 bug#49368: Guile 3.0.7 test failures on i686-linux, glibc 2.33 [core-updates] Ludovic Courtès
@ 2021-07-04 12:06 ` Maxime Devos
  2021-07-04 12:31 ` Maxime Devos
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Maxime Devos @ 2021-07-04 12:06 UTC (permalink / raw)
  To: Ludovic Courtès, 49368

[-- Attachment #1: Type: text/plain, Size: 2659 bytes --]

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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#49368: Guile 3.0.7 test failures on i686-linux, glibc 2.33 [core-updates]
  2021-07-03 21:41 bug#49368: Guile 3.0.7 test failures on i686-linux, glibc 2.33 [core-updates] Ludovic Courtès
  2021-07-04 12:06 ` Maxime Devos
@ 2021-07-04 12:31 ` Maxime Devos
  2021-07-06 13:24 ` Maxime Devos
  2021-07-24 18:46 ` Maxime Devos
  3 siblings, 0 replies; 5+ messages in thread
From: Maxime Devos @ 2021-07-04 12:31 UTC (permalink / raw)
  To: Ludovic Courtès, 49368

[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]

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

Curiously, on core-updates, ceiling/ is inconsistent with ceiling-quotient
and ceiling-remainder:

scheme@(guile-user) [1]> (ceiling/ 130.0 -10/7)
$28 = -90.0
$29 = 1.4285714285714257
scheme@(guile-user) [1]> (ceiling-quotient 130.0 -10/7)
$30 = -91.0
scheme@(guile-user) [1]> (ceiling-remainder 130.0 -10/7)
$31 = 0.0

But on 'master', the results are consistent:

scheme@(guile-user)> (ceiling/ 130.0 -10/7)
$1 = -91.0
$2 = 0.0
scheme@(guile-user)> (ceiling-quotient 130.0 -10/7)
$3 = -91.0
scheme@(guile-user)> (ceiling-remainder 130.0 -10/7)
$4 = 0.0

To be investigated ...

Greetings,
Maxime.
> 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#49368: Guile 3.0.7 test failures on i686-linux, glibc 2.33 [core-updates]
  2021-07-03 21:41 bug#49368: Guile 3.0.7 test failures on i686-linux, glibc 2.33 [core-updates] Ludovic Courtès
  2021-07-04 12:06 ` Maxime Devos
  2021-07-04 12:31 ` Maxime Devos
@ 2021-07-06 13:24 ` Maxime Devos
  2021-07-24 18:46 ` Maxime Devos
  3 siblings, 0 replies; 5+ messages in thread
From: Maxime Devos @ 2021-07-06 13:24 UTC (permalink / raw)
  To: Ludovic Courtès, 49368

[-- Attachment #1: Type: text/plain, Size: 2396 bytes --]

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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#49368: Guile 3.0.7 test failures on i686-linux, glibc 2.33 [core-updates]
  2021-07-03 21:41 bug#49368: Guile 3.0.7 test failures on i686-linux, glibc 2.33 [core-updates] Ludovic Courtès
                   ` (2 preceding siblings ...)
  2021-07-06 13:24 ` Maxime Devos
@ 2021-07-24 18:46 ` Maxime Devos
  3 siblings, 0 replies; 5+ messages in thread
From: Maxime Devos @ 2021-07-24 18:46 UTC (permalink / raw)
  To: 49368-done

[-- Attachment #1: Type: text/plain, Size: 630 bytes --]

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

This has been fixed on core-updates:
<https://git.savannah.gnu.org/cgit/guix.git/commit/?h=core-updates&id=fccc0275091af10a46471c68df525d19f446af9e>

Closing.

Greetings,
Maxime

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-24 18:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-03 21:41 bug#49368: Guile 3.0.7 test failures on i686-linux, glibc 2.33 [core-updates] Ludovic Courtès
2021-07-04 12:06 ` Maxime Devos
2021-07-04 12:31 ` Maxime Devos
2021-07-06 13:24 ` Maxime Devos
2021-07-24 18:46 ` Maxime Devos

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.