Bug#888459: flint-arb's tests fail on 32bit archs using mpfr 4.0.0

Vincent Lefevre vincent at vinc17.net
Fri Jan 26 14:13:53 UTC 2018


On 2018-01-25 23:43:14 +0100, Matthias Klose wrote:
> the testsuite fails on all 32bit architectures.
[...]
> div....FAIL (aliasing 4)!
> prec = 352, rnd = 4
> 
> x =
> (4586997233048136541430758450064474100387735230759824291973833691816938709832156080645343570059119116156929
> * 2^-154742412678922490659733883)
> 
> y =
> (51814976846671518298238808760042830604686502339620382299366747655022166929406808804341858227567903870767891933265103849315791036770763130077955430384829058539908460614800988509303528381975119100503701824233100229972596599113543202092890645352456600459286399836135725531911334505568114757105479020098464557517116791851426250751
> * 2^-154742431125385089392575577)
> 
> v =
> (2135987036418233318920600437589210504846524088997312026086185915310372929010612927677735486095361
> * 2^-154742412678922490659733852)
> 
> r1 = 1, r2 = 1

It may be a bug in MPFR 4.

I've built a 32-bit version on my machine, after adding a few
flint_printf because above, one just has one input and two outputs.

            default:
                flint_printf("x = "); arf_print(x); flint_printf("\n");
                flint_printf("y = "); arf_print(y); flint_printf("\n");
                r2 = arf_div_naive(v, y, x, prec, rnd);
                flint_printf("v = "); arf_print(v); flint_printf("\n");
                r1 = arf_div(x, y, x, prec, rnd);
                flint_printf("x = "); arf_print(x); flint_printf("\n\n");
                if (!arf_equal(x, v) || r1 != r2)
                {
                    flint_printf("FAIL (aliasing 4)!\n");
                    flint_printf("prec = %wd, rnd = %d\n\n", prec, rnd);
                    flint_printf("x = "); arf_print(x); flint_printf("\n\n");
                    flint_printf("y = "); arf_print(y); flint_printf("\n\n");
                    flint_printf("v = "); arf_print(v); flint_printf("\n\n");
                    flint_printf("r1 = %wd, r2 = %wd\n", r1, r2);
                    flint_abort();
                }
                break;

I can reproduce the failure:

x = (4294967295 * 2^-18446462598732840995)
y = (51814976846671518298238808760042830604686502339620382299366747655022166929406808804341858227567903870767891933265103849315791036770763130077955430384829058539908460614800988509303528381975119100503701824233100229972596599113543202092890645352456600459286399836135725531911334505568114757105479020098464557517116791851426250751 * 2^-154742431125385089392575577)
v = (2135987036418233318920600437589210504846524088997312026086185915310372929010612927677735486095361 * 2^-154742412678922490659733852)
x = (4586997233048136541430758450064474100387735230759824291973833691816938709832156080645343570059119116156929 * 2^-154742412678922490659733883)

FAIL (aliasing 4)!
prec = 352, rnd = 4

x = (4586997233048136541430758450064474100387735230759824291973833691816938709832156080645343570059119116156929 * 2^-154742412678922490659733883)

y = (51814976846671518298238808760042830604686502339620382299366747655022166929406808804341858227567903870767891933265103849315791036770763130077955430384829058539908460614800988509303528381975119100503701824233100229972596599113543202092890645352456600459286399836135725531911334505568114757105479020098464557517116791851426250751 * 2^-154742431125385089392575577)

v = (2135987036418233318920600437589210504846524088997312026086185915310372929010612927677735486095361 * 2^-154742412678922490659733852)

r1 = 1, r2 = 1

I'm going to look at it more closely.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



More information about the debian-science-maintainers mailing list