bdiv_q_2.c improved

Joe keane jgk at
Wed Oct 7 20:47:27 UTC 2015

>How do you measure the speed gain of your new code?

I haven't measured it.

>How do you test it, by hooking it in in mpn/divexact.c (patch in
>earlier mail) and then make gmp's standard make check?

I have a program that calls a lot of mpq functions.

>You should obviusly update credits and copyright years (and if some code
>is copied from earlier files, you inherit copyright years from them).

The code is mostly copied from "sbpi1_bdiv_q.c", so we should start from

>To be able include new code in GMP, we ask for assignment of copyright
>to the FSF. Are you willing to do that?

That's no problem.

>Maybe add_ssaaaa or sub_ddmmss could be used for some of the additions.

I need to use carry/add-with-carry somehow.  My 'solution' is to code the
whole thing in assembler, but maybe that is not necessary.

>You might want to experiment with using a two-limb inverse.

That's more complicated. :-)

More information about the gmp-devel mailing list