mini-gmp errors on SYSTYPE: powerpc750-unknown-linux-gnu

Marco Bodrato bodrato at mail.dm.unipi.it
Wed Dec 18 00:03:36 UTC 2019


Ciao,

Il 2019-12-17 23:18 tg at gmplib.org ha scritto:
> Marco Bodrato <bodrato at mail.dm.unipi.it> writes:

>   The test t-cmp_d for mini-gmp is failing with:
> 
>   mpz_cmp_d wrong (from check_infinity)
>     got  1
>     want -1
>     x=141246703213942603[...]
>   [...]
>     y 3.40282e+38
>     y 47 F0 00 00 00 00 00 00
> 
>   This comes from the following lines in mini-gmp/tests/t-cmp_d.c:
> 
>   void
>   check_infinity (void)
>   {
>     mpz_t   x;
>     double  y = HUGE_VAL;
>     if (y != 2*y)
>       return;
>   [..]
>     /* 2^5000 cmp inf */
>     mpz_set_ui (x, 1L);
>     mpz_mul_2exp (x, x, 5000L);
>     check_one ("check_infinity", x,  y, -1, -1);
>   [..]

> We often run into qemu bugs, and this might be another example.  It
> might be possible to find a version of qemu which runs the present
> binaries correctly.

Just looking at the report, it looks like an incorrect definition of 
HUGE_VAL by the compiler/headers, or an incorrect handling of the 
"infinity" value by the arithmetic operations on it. So yes, it can be a 
qemu bug on floats.

By the way... isn't 3.40282e+38 a small value for infinity stored in a 
double?

Ĝis,
m

-- 
http://bodrato.it/papers/


More information about the gmp-devel mailing list