mpq_cmp_z

Marco Bodrato bodrato at mail.dm.unipi.it
Sat Aug 22 09:36:28 UTC 2015


Ciao,

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.

Regards,
m

-- 
http://bodrato.it/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmp.c
Type: text/x-csrc
Size: 4897 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-devel/attachments/20150822/cea2f663/attachment.bin>


More information about the gmp-devel mailing list