unexpected MPZ_OVERFLOW

sisyphus sisyphus359 at proton.me
Mon Aug 17 15:21:15 CEST 2026


Sent with [Proton Mail](https://proton.me/mail/home) secure email.

On Thursday, August 13th, 2026 at 10:49 PM, Marco Bodrato <bodrato at anjara.org> wrote:

> [snip]
>
> On operative systems where the size of types are not changing for 32 and 64 bits, the limit basically are the same.
>
> But… with 32-bit limbs we have more granularity, so that we can stop allocating just 32 bits below the limit. With 64-bit limbs we have to stop 32 bits earlier, I mean 64 bits below the limit.
>
> To change this, we should change the definition of the type mp_bitcnt_t. It can be done, but it would be an incompatible change.
>
>> Is this all working as intended ?
>
> When the size of the type used for bit-count is the same for 32-bit or 64-bit; yes, it is working as intended.

Thanks for the reply, Marco.

I think that's all I really wanted to know. (I'll leave any discussions regarding possible alternative approaches to those who have a better grasp of the things that need to be considered.)

Cheers, Rob.


More information about the gmp-bugs mailing list