Important: The information in this document is obsolete and should not be used for new development.
randomx
You can use therandomxfunction to generate a random number.
double_t randomx (double_t * x);
x- The address of an integer in the range stored as a floating-point number.
DESCRIPTION
Therandomxfunction is a pseudorandom number generator. The functionrandomxreturns a pseudorandom number in the range of its argument. It uses the iteration formula
If seed values of
xare not integers or are outside the range specified forx, then results are unspecified. A pseudorandom rectangular distribution on the interval (0, 1) can be obtained by dividing the results fromrandomxby
EXCEPTIONS
The results are unspecified if the value of x is a noninteger or is outside of the range
SPECIAL CASES
If x is a zero, NaN, or Infinity, the results are unspecified.EXAMPLES
= any value in the range .