Generate a uniformly distributed random complex in the unit square [0, 1] * [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 GMPrand_init
function, see the GMP manual.
Return the MPC version, as a null-terminated string.
MPC_VERSION
is the version of MPC as a preprocessing constant.MPC_VERSION_MAJOR
,MPC_VERSION_MINOR
andMPC_VERSION_PATCHLEVEL
are respectively the major, minor and patch level of MPC version, as preprocessing constants.MPC_VERSION_STRING
is the version as a string constant, which can be compared to the result ofmpc_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 MPC version can be dynamically linked with a newer 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 MPC version at compile time:#if (!defined(MPC_VERSION) || (MPC_VERSION<MPC_VERSION_NUM(2,1,0))) # error "Wrong MPC version." #endif