mini-gmp and mpq
Bradley Lucier
lucier at math.purdue.edu
Mon Apr 30 18:41:53 UTC 2018
On 04/30/2018 04:06 AM, Marco Bodrato wrote:
> Ciao,
>
> Il Lun, 30 Aprile 2018 4:10 am, Bradley Lucier ha scritto:
>>> On Apr 29, 2018, at 9:02 PM, Marco Bodrato <bodrato at mail.dm.unipi.it>
>>>> Il Dom, 29 Aprile 2018 8:24 pm, Bradley Lucier ha scritto:
>
>> Looks good. The important case is when a=b, but I just realized that the
>> test can be refined to when the denominator of a is the denominator of b.
>
> Interesting observation. But, do you think it's worth replacing
> if (a != b)
> with
> if (mpz_cmp (mpq_denref (a), mpq_denref (b)))
> ?
No.
Brad
More information about the gmp-devel
mailing list