[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bignum branch

From: Paul Eggert
Subject: Re: bignum branch
Date: Tue, 17 Jul 2018 15:39:02 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Eli Zaretskii wrote:
But that problem will affect all platforms, wouldn't it?  Because GMP
can only work with 'long', and I guess we don't want to rely on stuff
like 'prtdiff_t' and 'intmax_t' being no wider than 'long'?  We'd need
to convert the other types explicitly.

Yes, of course. However, the more of these types are wider than a GMP limb, the more problems we'll have.

There's another thing about debugging. This stuff is still uncertain. That is, there are no doubt bugs in the bignum branch in this area, and we don't know yet how significant these correctness problems will be. With that in mind, it would be useful to have avoid-libgmp options with our own GMP replacement that uses uintmax_t limbs (or 'unsigned int' limbs, for that matter) for debugging purposes, to help us debug the inevitable glitches that will arise due to libgmp's limbs being wrong for some types.

I looked into libgmp, and it appears that all we would need is a 2-line change to mini-gmp.h. This should not be hard to maintain ourselves, with the idea of propagating it upstream when we can.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]