Go to the first, previous, next, last section, table of contents.


Arithmetic Functions

Function: void mpq_add (mpq_t sum, mpq_t addend1, mpq_t addend2)
Set sum to addend1 + addend2.

Function: void mpq_sub (mpq_t difference, mpq_t minuend, mpq_t subtrahend)
Set difference to minuend - subtrahend.

Function: void mpq_mul (mpq_t product, mpq_t multiplier, mpq_t multiplicand)
Set product to multiplier times multiplicand

Function: void mpq_div (mpq_t quotient, mpq_t dividend, mpq_t divisor)
Set quotient to dividend / divisor.

Function: void mpq_neg (mpq_t negated_operand, mpq_t operand)
Set negated_operand to -operand.

Function: void mpq_inv (mpq_t inverted_number, mpq_t number)
Set inverted_number to 1 / number. If the new denominator is zero, this routine will divide by zero.


Go to the first, previous, next, last section, table of contents.