Go forward to Assigning Rationals.
Go backward to Rational Number Functions.
Go up to Rational Number Functions.

Initialization and Assignment Functions
=======================================

 - Function: void mpq_init (mpq_t DEST_RATIONAL)
     Initialize DEST_RATIONAL and set it to 0/1.  Each variable should
     normally only be initialized once, or at least cleared out (using
     the function `mpq_clear') between each initialization.

 - Function: void mpq_clear (mpq_t RATIONAL_NUMBER)
     Free the space occupied by RATIONAL_NUMBER.  Make sure to call this
     function for all `mpq_t' variables when you are done with them.

 - Function: void mpq_set (mpq_t ROP, mpq_t OP)
 - Function: void mpq_set_z (mpq_t ROP, mpz_t OP)
     Assign ROP from OP.

 - Function: void mpq_set_ui (mpq_t ROP, unsigned long int OP1,
          unsigned long int OP2)
 - Function: void mpq_set_si (mpq_t ROP, signed long int OP1, unsigned
          long int OP2)
     Set the value of ROP to OP1/OP2.  Note that if OP1 and OP2 have
     common factors, ROP has to be passed to `mpq_canonicalize' before
     any operations are performed on ROP.