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

5.11 Advanced Functions

Macro: MPC_SET_X_Y (real_suffix, imag_suffix, rop, real, imag, rnd)

The macro MPC_SET_X_Y is designed to serve as the body of an assignment function and cannot be used by itself. The real_suffix and imag_suffix parameters are the types of the real and imaginary part, that is, the x in the mpfr_set_x function one would use to set the part; for the mpfr type, use fr. real (respectively imag) is the value you want to assign to the real (resp. imaginary) part, its type must conform to real_suffix (resp. imag_suffix). rnd is the mpc_rnd_t rounding mode. The return value is the usual inexact value (see Return Value).

For instance, you can define mpc_set_ui_fr as follows:

int mpc_set_ui_fr (mpc_t rop, long int re, double im, mpc_rnd_t rnd)
    MPC_SET_X_Y (ui, fr, rop, re, im, rnd);

This document was generated on September 15, 2012 using texi2html 5.0.

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