manpagez: man pages & more
info gmp
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.3 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_mul_2exp (mpq_t rop, mpq_t op1, mp_bitcnt_t op2)

Set rop to op1 times 2 raised to op2.

Function: void mpq_div (mpq_t quotient, mpq_t dividend, mpq_t divisor)

Set quotient to dividend/divisor.

Function: void mpq_div_2exp (mpq_t rop, mpq_t op1, mp_bitcnt_t op2)

Set rop to op1 divided by 2 raised to op2.

Function: void mpq_neg (mpq_t negated_operand, mpq_t operand)

Set negated_operand to -operand.

Function: void mpq_abs (mpq_t rop, mpq_t op)

Set rop to the absolute value of op.

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.


This document was generated on February 16, 2012 using texi2html 5.0.

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.