1DRAND48_R(3)               Linux Programmer's Manual              DRAND48_R(3)
2
3
4

NAME

6       drand48_r,   erand48_r,  lrand48_r,  nrand48_r,  mrand48_r,  jrand48_r,
7       srand48_r, seed48_r, lcong48_r - generate uniformly distributed pseudo-
8       random numbers reentrantly
9

SYNOPSIS

11       #include <stdlib.h>
12
13       int drand48_r(struct drand48_data *buffer, double *result);
14
15       int erand48_r(unsigned short xsubi[3],
16                     struct drand48_data *buffer, double *result);
17
18       int lrand48_r(struct drand48_data *buffer, long int *result);
19
20       int nrand48_r(unsigned short int xsubi[3],
21                     struct drand48_data *buffer, long int *result);
22
23       int mrand48_r(struct drand48_data *buffer,long int *result);
24
25       int jrand48_r(unsigned short int xsubi[3],
26                     struct drand48_data *buffer, long int *result);
27
28       int srand48_r(long int seedval, struct drand48_data *buffer);
29
30       int seed48_r(unsigned short int seed16v[3],
31                    struct drand48_data *buffer);
32
33       int lcong48_r(unsigned short int param[7],
34                     struct drand48_data *buffer);
35

DESCRIPTION

37       These functions are the reentrant analogs of the functions described in
38       drand48(3).  Instead of modifying the global  random  generator  state,
39       they use the supplied data buffer.
40
41       Before the first use, this struct must be initialized, e.g.  by filling
42       it with zeroes,  or  by  calling  one  of  the  functions  srand48_r(),
43       seed48_r(), or lcong48_r().
44

RETURN VALUE

46       The return value is 0.
47

CONFORMING TO

49       These functions are GNU extensions and are not portable.
50

SEE ALSO

52       drand48(3), rand(3), random(3)
53
54
55
56GNU                               2004-10-31                      DRAND48_R(3)
Impressum