Floor function for rationals available?

Moritz Schmitt gmp at schmi.tt
Mon Jun 22 08:31:32 UTC 2015


Hello,

I am using GMP with C, and I am looking for a floor function for rationals,
i.e., something like mpq_floor(). However, I can't seem to find it.

Of course one could program such a function by hand by extracting the nominator
and denominator, dividing, comparing, etc. But is this really the way to go?

Thanks for your help.

Best,
Moritz


More information about the gmp-discuss mailing list