nag_rngs_logical (g05kec) returns the logical value of the relation
where is a pseudorandom number from a uniform distribution over , generated by nag_rngs_basic (g05kac) using the values of igen and iseed as input to this function.
On entry: contains values which define the current state of the selected generator.
On exit: contains updated values defining the new state of the selected generator.
4:
fail – NagError *Input/Output
The NAG error argument (see Section 3.6 in the Essential Introduction).
6 Error Indicators and Warnings
NE_BAD_PARAM
On entry, argument had an illegal value.
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
NE_REAL
On entry, or : .
7 Accuracy
Not applicable.
8 Further Comments
None.
9 Example
This example prints the first five pseudorandom logical values generated by nag_rngs_logical (g05kec) after initialization by nag_rngs_init_repeatable (g05kbc), when the probability of a TRUE value is .