[GiNaC-devel] chinese_remainder() bug versus x86_64 (Was: Univariate GCD benchmark)
Alexei Sheplyakov
varg at metalica.kh.ua
Mon Feb 9 11:51:52 CET 2009
Dear Richard,
Some time ago I wrote:
> I've got another theory. There was a bug in chinese_remainder() function.
> It's easy to spot it on 32-bit architecture, but not on 64-bit one. If my
> theory is correct, the patch below should trigger the bug on 64-bit
> architecture. Could you please try it (WITHOUT applying a patch which is
> supposed to fix the bug, of course)?
>
>
> Note: this patch is not supposed to be applied to the `official' repository.
>
> diff --git a/ginac/polynomial/primes_factory.h b/ginac/polynomial/primes_factory.h
> index 093c973..d80bff7 100644
> --- a/ginac/polynomial/primes_factory.h
> +++ b/ginac/polynomial/primes_factory.h
> @@ -25,7 +25,7 @@ private:
> cln::cl_I last;
> // This ensures coefficients are immediate.
> static const int immediate_bits = 8*sizeof(void *) - __alignof__(void *);
> - static const long opt_hint = (1L << (immediate_bits >> 1)) - 1;
> + static const long opt_hint = (1L << 14) - 1L;
> public:
> primes_factory()
> {
Any feedback? I'm sorry for hurrying you, but this issue needs to be clarified
before the release.
Best regards,
Alexei
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: Digital signature
URL: <http://www.ginac.de/pipermail/ginac-devel/attachments/20090209/6b125139/attachment.sig>
More information about the GiNaC-devel
mailing list