drand48_rのヘルプ・マニュアル
日本語 英語
drand48_r --help
man drand48_r
DRAND48_R(3) Linux Programmer’s Manual DRAND48_R(3)
名前
drand48_r, erand48_r, lrand48_r, nrand48_r, mrand48_r, jrand48_r,
srand48_r, seed48_r, lcong48_r - 一様分布する疑似乱数をリエントラ ン ト
(reentrant) に生成する
書式
#include
int drand48_r(struct drand48_data *buffer, double *result);
int erand48_r(unsigned short xsubi[3],
struct drand48_data *buffer, double *result);
int lrand48_r(struct drand48_data *buffer, long int *result);
int nrand48_r(unsigned short int xsubi[3],
struct drand48_data *buffer, long int *result);
int mrand48_r(struct drand48_data *buffer,long int *result);
int jrand48_r(unsigned short int xsubi[3],
struct drand48_data *buffer, long int *result);
int srand48_r(long int seedval, struct drand48_data *buffer);
int seed48_r(unsigned short int seed16v[3],
struct drand48_data *buffer);
int lcong48_r(unsigned short int param[7],
struct drand48_data *buffer);
glibc 向けの機能検査マクロの要件 (feature_test_macros(7) 参照):
上記の全ての関数: _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE
説明
こ れらの関数は drand48(3) で説明されている関数に類似するリエントラント
な関数である。大域的な乱数生成の状態を変更する代わりに、これらの関数 は
指定されたデータ buffer を使う。
最 初に使う前に、この構造体は初期化されていなければならない。初期化は、
たとえば 0 で埋めたり、関数 srand48_r(), seed48_r(), lcong48_r() のいず
れかを呼び出すことによって行われる。
返り値
返り値は 0 である。
準拠
これらの関数は GNU による拡張であり、移植性はない。
関連項目
drand48(3), rand(3), random(3)
GNU 2007-07-26 DRAND48_R(3)
DRAND48_R(3) Linux Programmer’s Manual DRAND48_R(3)
NAME
drand48_r, erand48_r, lrand48_r, nrand48_r, mrand48_r, jrand48_r,
srand48_r, seed48_r, lcong48_r - generate uniformly distributed pseudo-
random numbers reentrantly
SYNOPSIS
#include
int drand48_r(struct drand48_data *buffer, double *result);
int erand48_r(unsigned short xsubi[3],
struct drand48_data *buffer, double *result);
int lrand48_r(struct drand48_data *buffer, long int *result);
int nrand48_r(unsigned short int xsubi[3],
struct drand48_data *buffer, long int *result);
int mrand48_r(struct drand48_data *buffer,long int *result);
int jrand48_r(unsigned short int xsubi[3],
struct drand48_data *buffer, long int *result);
int srand48_r(long int seedval, struct drand48_data *buffer);
int seed48_r(unsigned short int seed16v[3],
struct drand48_data *buffer);
int lcong48_r(unsigned short int param[7],
struct drand48_data *buffer);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
All functions shown above: _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE
DESCRIPTION
These functions are the reentrant analogs of the functions described in
drand48(3). Instead of modifying the global random generator state,
they use the supplied data buffer.
Before the first use, this struct must be initialized, for example, by
filling it with zeros, or by calling one of the functions srand48_r(),
seed48_r(), or lcong48_r().
RETURN VALUE
The return value is 0.
CONFORMING TO
These functions are GNU extensions and are not portable.
SEE ALSO
drand48(3), rand(3), random(3)
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU 2007-07-26 DRAND48_R(3)