]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/drand48_r.3
Import of man-pages 1.70
[thirdparty/man-pages.git] / man3 / drand48_r.3
1 .\" Copyright 2003 Walter Harms, 2004 Andries Brouwer <aeb@cwi.nl>.
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Created 2004-10-31. Text taken from a page by Walter Harms, 2003-09-08
24 .\"
25 .TH DRAND48_R 3 2004-10-31 "GNU" "Linux Programmer's Manual"
26 .SH NAME
27 drand48_r, erand48_r, lrand48_r, nrand48_r, mrand48_r, jrand48_r,
28 srand48_r, seed48_r, lcong48_r
29 \- generate uniformly distributed pseudo-random numbers reentrantly
30 .SH SYNOPSIS
31 .nf
32 .B #include <stdlib.h>
33 .sp
34 .BI "int drand48_r(struct drand48_data *" buffer ", double *" result );
35 .sp
36 .BI "int erand48_r(unsigned short " xsubi [3] ","
37 .br
38 .BI " struct drand48_data *"buffer ", double *" result ");"
39 .sp
40 .BI "int lrand48_r(struct drand48_data *" buffer ", long int *" result );
41 .sp
42 .BI "int nrand48_r(unsigned short int " xsubi[3] ","
43 .br
44 .BI " struct drand48_data *"buffer ", long int *" result ");"
45 .sp
46 .BI "int mrand48_r(struct drand48_data *" buffer ",long int *" result ");"
47 .sp
48 .BI "int jrand48_r(unsigned short int " xsubi[3] ","
49 .br
50 .BI " struct drand48_data *" buffer ", long int *" result ");"
51 .sp
52 .BI "int srand48_r(long int " seedval ", struct drand48_data *" buffer ");"
53 .sp
54 .BI "int seed48_r(unsigned short int " seed16v[3] ","
55 .br
56 .BI " struct drand48_data *" buffer ");"
57 .sp
58 .BI "int lcong48_r(unsigned short int " param[7] ","
59 .br
60 .BI " struct drand48_data *" buffer ");"
61 .fi
62 .SH DESCRIPTION
63 These functions are the reentrant analogs of the functions described in
64 .BR drand48 (3).
65 Instead of modifying the global random generator state, they use
66 the supplied data
67 .IR buffer .
68
69 Before the first use, this struct must be initialized, e.g.
70 by filling it with zeroes, or by calling one of the functions
71 .BR srand48_r() ,
72 .BR seed48_r() ,
73 or
74 .BR lcong48_r() .
75 .SH "RETURN VALUE"
76 The return value is 0.
77 .SH "CONFORMING TO"
78 These functions are GNU extensions and are not portable.
79 .SH "SEE ALSO"
80 .BR drand48 (3),
81 .BR rand (3),
82 .BR random (3)