all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: "Ludovic Courtès" <ludo@gnu.org>, 49368@debbugs.gnu.org
Subject: bug#49368: Guile 3.0.7 test failures on i686-linux, glibc 2.33 [core-updates]
Date: Tue, 06 Jul 2021 15:24:46 +0200	[thread overview]
Message-ID: <b6b4a1391d032a4f01ab5901e12464493e1c10a2.camel@telenet.be> (raw)
In-Reply-To: <87tulbxegp.fsf@inria.fr>

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

  parent reply	other threads:[~2021-07-06 13:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-07-24 18:46 ` Maxime Devos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b6b4a1391d032a4f01ab5901e12464493e1c10a2.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=49368@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.