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

4.5 Return Value

Most GNU MPC functions have a return value of type int, which is used to indicate the position of the rounded real and imaginary parts with respect to the exact (infinite precision) values. If this integer is i, the macros MPC_INEX_RE(i) and MPC_INEX_IM(i) give 0 if the corresponding rounded value is exact, a negative value if the rounded value is less than the exact one, and a positive value if it is greater than the exact one. Similarly, functions computing a result of type mpfr_t return an integer that is 0, positive or negative depending on whether the rounded value is the same, larger or smaller then the exact result.

Some functions, such as mpc_sin_cos, compute two complex results; the macros MPC_INEX1(i) and MPC_INEX2(i), applied to the return value i of such a function, yield the exactness value corresponding to the first or the second computed value, respectively.


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

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