vincent at vinc17.net
Tue Dec 11 07:56:50 UTC 2018
On 2018-12-11 03:55:53 +0100, Marco Bodrato wrote:
> Il Lun, 10 Dicembre 2018 10:07 pm, Niels Möller ha scritto:
> > And I think we should always require that arithmetic on mp_limb_t is mod
> > (GMP_LIMB_MAX + 1), so that & GMP_LIMB_MAX usually is redundant (with
> Do you mean I should have pushed the line with even more parentheses?
> assert ((r0 & (GMP_LIMB_MAX >> (GMP_LIMB_BITS - shift))) == 0);
The precedence between &, >> and - is not intuitive, ditto
between & and ==.
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
More information about the gmp-devel