Programowanie w systemie UNIX/MPC: Różnice pomiędzy wersjami

Usunięta treść Dodana treść
→‎Użycie: kompilacja
Linia 136:
"Most 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"
 
==Jak używać w c ?==
==Użycie==
 
Etapy użycia :<ref>[https://www.gnu.org/ghm/2011/paris/slides/andreas-enge-mpc.pdf The MPC library - a quick introduction by Andreas Enge]</ref>
Linia 157:
mpc_clear (z)
</source>
 
 
 
Linia 176 ⟶ 175:
}
</source>
 
Kompilacja :
 
gcc ... -lmpc -lmpfr -lgmp ...
 
===Przykłady===