nag_rand_uniform (g05sqc) generates a vector of pseudorandom numbers uniformly distributed over the interval .
If
and
, nag_rand_uniform (g05sqc) returns the next
values
from a uniform
generator (see
nag_rand_basic (g05sac) for details).
For other values of
and
, nag_rand_uniform (g05sqc) applies the transformation
The function ensures that the values
lie in the closed interval
.
One of the initialization functions
nag_rand_init_repeatable (g05kfc) (for a repeatable sequence if computed sequentially) or
nag_rand_init_nonrepeatable (g05kgc) (for a non-repeatable sequence) must be called prior to the first call to nag_rand_uniform (g05sqc).
Not applicable.
nag_rand_uniform (g05sqc) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the
x06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
This example prints five pseudorandom numbers from a uniform distribution between
and
, generated by a single call to nag_rand_uniform (g05sqc), after initialization by
nag_rand_init_repeatable (g05kfc).
None.