Marco Bodrato bodrato at
Sat Aug 22 09:36:28 UTC 2015


On Fri, August 21, 2015 10:36 pm, Marco Bodrato wrote:
> Maybe changing the prototype of mpq_cmp_maybe_z to
> int mpq_cmp_maybe_z (mpq_srcptr op1, const void *op2, int op2_is_mpz)

... no, void * is a nonsense ...

Maybe the attached version is better, it uses the cast (mpz_srcptr) op2
when the numerator is needed, and a plain DEN(op2) to access the
denominator if it is available.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmp.c
Type: text/x-csrc
Size: 4897 bytes
Desc: not available
URL: <>

More information about the gmp-devel mailing list