nag_rand_logical (g05tbc) generates a vector of pseudorandom logical values – Nag_TRUE with probability and Nag_FALSE with probability .
nag_rand_logical (g05tbc) generates
logical values
from the relation
where
is a pseudorandom number from a uniform distribution over
, generated by
nag_rand_basic (g05sac) using the values of
state as input to this function.
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_logical (g05tbc).
Not applicable.
Not applicable.
None.
This example prints the first
pseudorandom logical values generated by nag_rand_logical (g05tbc) after initialization by
nag_rand_init_repeatable (g05kfc), when the probability of a Nag_TRUE value is
.
None.