Improvement of assert in longlong.h

Claus Fischer claus.fischer at
Fri Mar 30 17:35:03 CEST 2007

Dear GMP folks,

I have recently looked into GMP's longlong.h, specifically
the function __udiv_qrnnd_c.

It appears to me the assert in line 1738 of Version 4.2.1
should be changed from

    ASSERT ((d) != 0);


    ASSERT ((d) >= __ll_B);

so that the resulting d1 will be nonzero.

Best regards,

Claus Fischer

Claus Fischer <claus.fischer at>

More information about the gmp-discuss mailing list