Exact division

Niels Möller nisse at lysator.liu.se
Tue Dec 8 17:09:52 CET 2009


With bdiv_q now working, I wrote a simple divexact function, and I use
it in mpn/gcdext.c where it needs to compute the second cofactor. As a
result, the GCDEXT_DC_THRESHOLD on shell was reduced from 496 to around
415. I guess it would be reduced a little more more with a more clever
bidirectional divexact.

(There are two problems with mpn/divexact.c: (1) Torbjörn doesn't trust
the current implementation, and (2) it requires that the divisor is
odd. Feel free to move the code in mpn/gcdext.c:divexact).

Regards,
/Niels

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



More information about the gmp-devel mailing list