Next: Advanced Functions, Previous: Trigonometric Functions, Up: Complex Functions [Index]
Generate a uniformly distributed random complex in the unit square [0,
1] x [0, 1]. Return 0, unless an exponent in the real or imaginary part
is not in the current exponent range, in which case that part is set to NaN
and a zero value is returned. The second argument is a gmp_randstate_t
structure which should be created using the GMP rand_init
function, see
the GMP manual.
Return the GNU MPC version, as a null-terminated string.
MPC_VERSION
is the version of GNU MPC as a preprocessing constant.
MPC_VERSION_MAJOR
, MPC_VERSION_MINOR
and
MPC_VERSION_PATCHLEVEL
are respectively the major, minor and
patch level of GNU MPC version, as preprocessing constants.
MPC_VERSION_STRING
is the version as a string constant, which
can be compared to the result of mpc_get_version
to check at
run time the header file and library used match:
if (strcmp (mpc_get_version (), MPC_VERSION_STRING)) fprintf (stderr, "Warning: header and library do not match\n");
Note: Obtaining different strings is not necessarily an error, as in general, a program compiled with some old GNU MPC version can be dynamically linked with a newer GNU MPC library version (if allowed by the library versioning system).
Create an integer in the same format as used by MPC_VERSION
from the
given major, minor and patchlevel.
Here is an example of how to check the GNU MPC version at compile time:
#if (!defined(MPC_VERSION) || (MPC_VERSION<MPC_VERSION_NUM(2,1,0))) # error "Wrong GNU MPC version." #endif
Next: Advanced Functions, Previous: Trigonometric Functions, Up: Complex Functions [Index]