1HPL_rand(3)                  HPL Library Functions                 HPL_rand(3)
2
3
4

NAME

6       HPL_rand - random number generator.
7

SYNOPSIS

9       #include "hpl.h"
10
11       double HPL_rand();
12

DESCRIPTION

14       HPL_rand  generates   the  next number  in the  random  sequence.  This
15       function  ensures  that this number lies in the interval (-0.5, 0.5].
16
17       The static array irand contains the information (2  integers)  required
18       to  generate  the  next number  in the sequence  X(n).  This  number is
19       computed as X(n) = (2^32 * irand[1] + irand[0]) / d - 0.5,   where  the
20       constant  d  is the largest 64 bit positive integer. The array irand is
21       then  updated  for the generation of the next number  X(n+1)   in   the
22       random sequence as follows X(n+1) = a * X(n) + c. The constants a and c
23       should have been preliminarily stored in the arrays ias and  ics  as  2
24       pairs  of  integers.   The  initialization of  ias,  ics and  irand  is
25       performed by the function HPL_setran.
26

SEE ALSO

28       HPL_ladd (3),     HPL_lmul (3),     HPL_setran (3),     HPL_xjumpm (3),
29       HPL_jumpit (3).
30
31
32
33HPL 2.2                        February 24, 2016                   HPL_rand(3)
Impressum