The set of mpq
functions is quite small. In particular, there are no
functions for either input or output. But there are two macros that allow us
to apply any mpz
function on the numerator or denominator of a rational
number. If these macros are used to assign to the rational number,
mpq_canonicalize
normally need to be called afterwards.
mpz
functions can be used on the result of these macros.
Go to the first, previous, next, last section, table of contents.