Important: The information in this document is obsolete and should not be used for new development.
randomx
You can use therandomx
function 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
Therandomx
function is a pseudorandom number generator. The functionrandomx
returns a pseudorandom number in the range of its argument. It uses the iteration formula
If seed values of
x
are 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 fromrandomx
by
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 .