OS X + core 2 duo + nails

Paul Zimmermann Paul.Zimmermann at loria.fr
Mon Jun 2 15:31:59 CEST 2008


       Hi David, nice to hear from you,

> I'm getting a few "make check" failures for GMP 4.2.2 (unpatched,  
> direct from GMP web site) on a core 2 duo macbook, OS X 10.4.11, when  
> nails are enabled. I'm not sure if this is really a bug, since nails  
> are supposed to be experimental, but nails have worked for me before  
> on other platforms so I thought I should report this.
> 
> I configure with
> 
> ./configure --enable-nails=1
> 
> The build appears to go fine, but then I get the following three  
> failures:
> 
> ERROR
> x2        = 6CC
> x         = 3A
> remainder = 73
> FAIL: t-sqrtrem
> 
> mpz_perfect_square_p got 0, want 1
>    n=0xFF45DB0B2A0D2BD2CDFC636BDB29
> FAIL: t-perfsqr
> 
> mpz_set_si wrong on data[3]
> FAIL: t-set_si

I guess this has nothing to do with OS X, but the reason is the odd (!) value
nails=1, which is not supported by the square root code (mpn/sqrtrem.c) I've
written. Note that line 105 should fail:

  ASSERT (GMP_NAIL_BITS % 2 == 0);

I have the same problem on an Opteron and on a Pentium M under Linux.

Paul




More information about the gmp-bugs mailing list