NAME

kjb_rand - Returns a random double between 0 and 1.

SYNOPSIS

#include "l/l_sys_rand.h"

Example compile flags (system dependent):
  -DLINUX_386 -DLINUX_386_P4  
   -I/home/kobus/include
   -L/home/kobus/load/linux_386_p4 -L/usr/local/lib -L/usr/lib
  -lKJB         -llapack -lblas -lg2c          -lXext -lX11 


double kjb_rand(void);

DESCRIPTION

This routine returns a random double between 0 and 1 using erand48(). The seeding of the random number generator is normally exposed to the user through the option "seed". It may also be seeded using the routine kjb_seed_rand(). If the generator is not seeded, then a default seed is used (zeros). The form of the seed option value is <value_1>:<value_2>, where value_1 and value_2 are either integers, or the special value "*", which gets converted to the time of day as returned by the routine time(NULL). This routine sets up a different stream of random numbers from kjb_rand_2. In general, the library code uses kjb_rand_2, with kjb_rand being the normal choise for higher level code. This random number generator is restartable from the seed value obtained by get_rand_seed().

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Kobus Barnard

DOCUMENTOR

Kobus Barnard

SEE ALSO

kjb_seed_rand_with_tod , kjb_seed_rand , kjb_seed_rand_with_3_short , get_rand_seed , kjb_rand_2 , kjb_seed_rand_2_with_tod , kjb_seed_rand_2