misleading comment

jason at njkfrudils.plus.com jason at njkfrudils.plus.com
Mon Feb 9 06:40:34 CET 2009

in gmp-impl.h we have

/* Like udiv_qrnnd_preinv2, but for for any value D.  DNORM is D shifted left
   so that its most significant bit is set.  LGUP is ceil(log2(D)).  */
#define udiv_qrnnd_preinv2gen(q, r, nh, nl, d, di, dnorm, lgup)

Surely lgup should be floor(log2(D))+1

More information about the gmp-bugs mailing list