Vincent Delecroix vincent.delecroix at
Sat Aug 15 10:37:13 UTC 2015

Dear all,

I am new to this list. I am a regular developer of the SageMath project 
[1] in which we use mpz_t and mpq_t as our based type for integers and 
rationals. We often have to compare integers with rationals and I came 
to the conclusion that it would be convenient to have a GMP function

    int mpq_cmp_z(mpq_t, mpz_t)

See the down stream ticket [2]. As we ship mpir by default, I made a 
concrete proposal to them [3] and they kindly asked me to make the 
proposal directly to GMP since they do want to keep their interface 
consistent with the GMP project.

If you think that it would be a good addition, you might have a look in 
the attached patch that was tested on the development version of GMP.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpq_cmp_z.patch
Type: text/x-patch
Size: 6677 bytes
Desc: not available
URL: <>

More information about the gmp-devel mailing list