random_option
Selects the uniform (0,1) multiplicative congruential pseudorandom number generator.
Synopsis
#include <imsl.h>
void imsl_random_option (int generator_option)
Required Arguments
int generator_option (Input)
Indicator of the generator. The random number generator is a multiplicative congruential generator with modulus 231  1. Argument generator_option is used to choose the multiplier and whether or not shuffling is done.
generator_option
Generator
1
multiplier 16807 used
2
multiplier 16807 used with shuffling
3
multiplier 397204094 used
4
multiplier 397204094 used with shuffling
5
multiplier 950706376 used
6
multiplier 950706376 used with shuffling
Description
The IMSL uniform pseudorandom number generators use a multiplicative congruential method, with or without shuffling. The value of the multiplier and whether or not to use shuffling are determined by imsl_random_option. The description of function imsl_f_random_uniform may provide some guidance in the choice of the form of the generator. If no selection is made explicitly, the generators use the multiplier 16807 without shuffling. This form of the generator has been in use for some time (Lewis et al. 1969).
Example
The C statement
imsl_random_option(1)
selects the simple multiplicative congruential generator with multiplier 16807. Since this is the same as the default, this statement has no effect unless imsl_random_option had previously been called in the same program to select a different generator.