Re: mpq_cmp_z

2015-08-25 Thread Niels Möller
Marco Bodrato bodr...@mail.dm.unipi.it writes: If you pass NULL, you'll not avoid any pesky branch :-D If you pass a static 1, and do not branch, you will end up allocating space and loosing time to multiply NUM(op1) by one... Depends on whether or not we want to recognize the integer case

Re: mpq_cmp_z

2015-08-25 Thread Marco Bodrato
Ciao, On Mon, August 24, 2015 6:24 pm, Torbjörn Granlund wrote: An alternative to messing with void * would be an interface like this: static int cmp_helper (mpq_srcptr op1, mpz_srcptr op2num, mpz_srcptr op2den) I tested this one: cmp_helper (mpq_srcptr o1, mpz_srcptr o2n, mpz_srcptr o2d,