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


Arithmetic Functions

Function: void mpf_add (mpf_t rop, mpf_t op1, mpf_t op2)
Function: void mpf_add_ui (mpf_t rop, mpf_t op1, unsigned long int op2)

Function: void mpf_sub (mpf_t rop, mpf_t op1, mpf_t op2)
Function: void mpf_ui_sub (mpf_t rop, unsigned long int op1, mpf_t op2)
Function: void mpf_sub_ui (mpf_t rop, mpf_t op1, unsigned long int op2)
Set rop to op1 - op2.

Function: void mpf_mul (mpf_t rop, mpf_t op1, mpf_t op2)
Function: void mpf_mul_ui (mpf_t rop, mpf_t op1, unsigned long int op2)

Division is undefined if the divisor is zero, and passing a zero divisor to the divide functions will make these functions intentionally divide by zero. This gives the user the possibility to handle arithmetic exceptions in these functions in the same manner as other arithmetic exceptions.

Function: void mpf_div (mpf_t rop, mpf_t op1, mpf_t op2)
Function: void mpf_ui_div (mpf_t rop, unsigned long int op1, mpf_t op2)
Function: void mpf_div_ui (mpf_t rop, mpf_t op1, unsigned long int op2)
Set rop to op1/op2.

Function: void mpf_sqrt (mpf_t rop, mpf_t op)
Function: void mpf_sqrt_ui (mpf_t rop, unsigned long int op)

Function: void mpf_neg (mpf_t rop, mpf_t op)
Set rop to -op.

Function: void mpf_abs (mpf_t rop, mpf_t op)
Set rop to the absolute value of op.

Function: void mpf_mul_2exp (mpf_t rop, mpf_t op1, unsigned long int op2)

Function: void mpf_div_2exp (mpf_t rop, mpf_t op1, unsigned long int op2)


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