Up: Calling the Base Generators


DRANDBLUMBLUMSHUB / SRANDBLUMBLUMSHUB

Allows direct access to the bit stream generated by the Blum-Blum-Shub generator.

(Note that SRANDBLUMBLUMSHUB is the single precision version of DRANDBLUMBLUMSHUB. The argument lists of both routines are identical except that any double precision arguments of DRANDBLUMBLUMSHUB are replaced in SRANDBLUMBLUMSHUB by single precision arguments - type REAL in FORTRAN or type float in C).

— SUBROUTINE: DRANDBLUMBLUMSHUB (N,STATE,X,INFO)
— Input: INTEGER N

On input: number of variates required. The total number of bits generated is 24N.
Constraint: N>=0.

— Input/Output: INTEGER STATE(*)

The STATE vector holds information on the state of the base generator being used and as such its minimum length varies. Prior to calling DRANDBLUMBLUMSHUB STATE must have been initialized. See Initialization of the Base Generators for information on initialization of the STATE variable.
On input: the current state of the base generator.
On output: the updated state of the base generator.

— Output: INTEGER X(N)

On output: vector holding the bit stream. The least significant 24 bits of each of the X(i) contain the bit stream as generated by the Blum-Blum-Shub generator. The least significant bit of X(1) is the first bit generated, the second least significant bit of X(1) is the second bit generated etc.

— Output: INTEGER INFO

On output: INFO is an error indicator. On successful exit, INFO contains 0. If INFO = -i on exit, the i-th argument had an illegal value.