Micro-GMP

Niels Möller nisse at lysator.liu.se
Tue Dec 11 08:21:39 UTC 2018


"Marco Bodrato" <bodrato at mail.dm.unipi.it> writes:

> Supporting very small sizes, and odd sizes might not be easy. And
> currently Paul reported failures for 32-bit limbs on 64-bit machines...
> asl.h is more interesting for GMP than for mini-.

And if we can make asl.h work well in GMP, small limb sizes in mini-gmp
(Micro-GMP) becomes less interesting, right?

> I pushed
>       assert ((r0 & GMP_LIMB_MAX >> (GMP_LIMB_BITS - shift)) == 0);

Thanks.

> Do you mean I should have pushed the line with even more parentheses?
>     assert ((r0 & (GMP_LIMB_MAX >> (GMP_LIMB_BITS - shift))) == 0);

I would have written it that way. I find C precendence rules for these
operators (defined to be same as for visually similar operators) a bit
odd and hard to remember. But it's fine as is, if you think that's more
readable, and gcc -Wall doesn't warn about it.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list