Projection & Decomposing (GNU MPC 1.3.0)

Next: Basic Arithmetic Functions, Previous: Comparison Functions, Up: Complex Functions [Index]

### 5.6 Projection and Decomposing Functions

Function: int mpc_real (mpfr_t rop, const mpc_t op, mpfr_rnd_t rnd) ¶

  Set rop to the value of the real part of op rounded in the direction rnd.

Function: int mpc_imag (mpfr_t rop, const mpc_t op, mpfr_rnd_t rnd) ¶

  Set rop to the value of the imaginary part of op rounded in the direction rnd.

Macro: mpfr_t mpc_realref (mpc_t op) ¶
Macro: mpfr_t mpc_imagref (mpc_t op) ¶

  Return a reference to the real part and imaginary part of op, respectively. The `mpfr` functions can be used on the result of these macros (note that the `mpfr_t` type is itself a pointer).

Function: int mpc_arg (mpfr_t rop, const mpc_t op, mpfr_rnd_t rnd) ¶

  Set rop to the argument of op, with a branch cut along the negative real axis.

Function: int mpc_proj (mpc_t rop, const mpc_t op, mpc_rnd_t rnd) ¶

  Compute a projection of op onto the Riemann sphere. Set rop to op rounded in the direction rnd, except when at least one part of op is infinite (even if the other part is a NaN) in which case the real part of rop is set to plus infinity and its imaginary part to a signed zero with the same sign as the imaginary part of op.