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
36   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
37
38       All functions shown above: _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE
39

DESCRIPTION

41       These functions are the reentrant analogs of the functions described in
42       drand48(3).  Instead of modifying the global  random  generator  state,
43       they use the supplied data buffer.
44
45       Before  the first use, this struct must be initialized, for example, by
46       filling it with zeros, or by calling one of the functions  srand48_r(),
47       seed48_r(), or lcong48_r().
48

RETURN VALUE

50       The return value is 0.
51

CONFORMING TO

53       These functions are GNU extensions and are not portable.
54

SEE ALSO

56       drand48(3), rand(3), random(3)
57

COLOPHON

59       This  page  is  part of release 3.53 of the Linux man-pages project.  A
60       description of the project, and information about reporting  bugs,  can
61       be found at http://www.kernel.org/doc/man-pages/.
62
63
64
65GNU                               2007-07-26                      DRAND48_R(3)
Impressum