OSDN Git Service

Retire LDP man-pages repository
[linuxjm/LDP_man-pages.git] / draft / man3 / drand48.3
diff --git a/draft/man3/drand48.3 b/draft/man3/drand48.3
deleted file mode 100644 (file)
index 97ee73d..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
-.\"
-.\" %%%LICENSE_START(VERBATIM)
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one.
-.\"
-.\" Since the Linux kernel and libraries are constantly changing, this
-.\" manual page may be incorrect or out-of-date.  The author(s) assume no
-.\" responsibility for errors or omissions, or for damages resulting from
-.\" the use of the information contained herein.  The author(s) may not
-.\" have taken the same level of care in the production of this manual,
-.\" which is licensed free of charge, as they might when working
-.\" professionally.
-.\"
-.\" Formatted or processed versions of this manual, if unaccompanied by
-.\" the source, must acknowledge the copyright and authors of this work.
-.\" %%%LICENSE_END
-.\"
-.\" References consulted:
-.\"     Linux libc source code
-.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
-.\"     386BSD man pages
-.\" Modified Sat Jul 24 19:46:03 1993 by Rik Faith (faith@cs.unc.edu)
-.\"*******************************************************************
-.\"
-.\" This file was generated with po4a. Translate the source file.
-.\"
-.\"*******************************************************************
-.\"
-.\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
-.\"       all rights reserved.
-.\" Translated Mon Jan 20 20:04:05 JST 1997
-.\"       by YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
-.\"
-.TH DRAND48 3 2014\-09\-21 "" "Linux Programmer's Manual"
-.SH 名前
-drand48, erand48, lrand48, nrand48, mrand48, jrand48, srand48, seed48,
-lcong48 \- 一様分布する疑似乱数を生成する関数
-.SH 書式
-.nf
-\fB#include <stdlib.h>\fP
-.sp
-\fBdouble drand48(void);\fP
-.sp
-\fBdouble erand48(unsigned short \fP\fIxsubi\fP\fB[3]);\fP
-.sp
-\fBlong int lrand48(void);\fP
-.sp
-\fBlong int nrand48(unsigned short \fP\fIxsubi\fP\fB[3]);\fP
-.sp
-\fBlong int mrand48(void);\fP
-.sp
-\fBlong int jrand48(unsigned short \fP\fIxsubi\fP\fB[3]);\fP
-.sp
-\fBvoid srand48(long int \fP\fIseedval\fP\fB);\fP
-.sp
-\fBunsigned short *seed48(unsigned short \fP\fIseed16v\fP\fB[3]);\fP
-.sp
-\fBvoid lcong48(unsigned short \fP\fIparam\fP\fB[7]);\fP
-.fi
-.sp
-.in -4n
-glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
-.in
-.sp
-.ad l
-.\" .BR drand48 (),
-.\" .BR erand48 (),
-.\" .BR lrand48 (),
-.\" .BR nrand48 (),
-.\" .BR mrand48 (),
-.\" .BR jrand48 (),
-.\" .BR srand48 (),
-.\" .BR seed48 (),
-.\" .BR lcong48 ():
-上記の全ての関数: _SVID_SOURCE || _XOPEN_SOURCE
-.ad b
-.SH 説明
-これらの関数は線形合同アルゴリズムと 48ビット整数演算を用いて 疑似乱数を生成する。
-.PP
-関数 \fBdrand48\fP()  と \fBerand48\fP()  は、区間 [0.0, 1.0) で 一様分布する非負の倍精度浮動小数点実数値を返す。
-.PP
-関数 \fBlrand48\fP()  と \fBnrand48\fP()  は 0 と 2^31 の間で一様分布する 非負のロング整数を返す。
-.PP
-関数 \fBmrand48\fP()  と \fBjrand48\fP()  は \-2^31 と 2^31 の間で一様分布する符号付きロング整数を返す。
-.PP
-関数 \fBsrand48\fP(), \fBseed48\fP(), \fBlcong48\fP()  は初期化関数 である。 関数 \fBdrand48\fP(),
-\fBlrand48\fP(), \fBmrand48\fP()  を 使用する前に、これらの初期化関数のいずれかを呼ぶべきである。 関数
-\fBerand48\fP(), \fBnrand48\fP(), \fBjrand48\fP()  は初めに 初期化関数を呼ぶことを必要としない。
-.PP
-ここで説明しているすべての関数は 48ビットの整数の シーケンス (\fIXi\fP) を生成することで 機能している。生成方法は以下の線形合同の式による。
-.sp
-.nf
-.RS
-\fBXn+1 = (aXn + c) mod m,\fP
-.RE
-.fi
-.sp
-ここで n >= 0 である。 パラメーターが \fIm\fP = 2^48 であるため、48ビット整数演算が行われている。 \fBlcong48\fP()
-が呼ばれていない場合、\fIa\fP と \fIc\fP は以下の式で与えられる。
-.sp
-.nf
-.RS
-\fBa = 0x5DEECE66D\fP
-\fBc = 0xB\fP
-.RE
-.fi
-.sp
-関数 \fBdrand48\fP(), \fBerand48\fP(), \fBlrand48\fP(), \fBnrand48\fP(), \fBmrand48\fP(),
-\fBjrand48\fP()  で返される値は次のようにして計算される。 はじめに、次の48ビットの \fIXi\fP が計算される。
-そして、返すべきデータの型に依存した適切な ビット数が \fIXi\fP の上位ビットからコピーされる。 最後に、この値を返り値に変換する。
-.PP
-関数 \fBdrand48\fP(), \fBlrand48\fP(), \fBmrand48\fP()  は 最後に生成された48ビットの \fIXi\fP
-を内部バッファーに格納する。 配列の形の引数 \fIxsubi\fP に個々の \fIXi\fP の値を 格納できるような領域を確保することを、 関数
-\fBerand48\fP(), \fBnrand48\fP(), \fBjrand48\fP()  は、 呼び出し側のプログラムに要求する。
-これらの関数は、はじめてそれらの関数を呼ぶ前に \fIXi\fP の初期値を配列に 代入することで初期化される。
-.PP
-初期化関数 \fBsrand48\fP()  は、\fIXi\fP の 上位32ビットを引数 \fIseedval\fP に設定する。
-下位の16ビットは、適当に決められた値である0x330Eに設定される。
-.PP
-初期化関数 \fBseed48\fP()  は、\fIXi\fP の値を、 配列の形をした引数である \fIseed16v\fP の中で指定された
-48ビットの値に設定する。 \fIXi\fP の前の値は内部バッファーにコピーされ、このバッファーへのポインターが \fBseed48\fP()
-によって返される。
-.PP
-初期化関数 \fBlcong48\fP()  は使用者が \fIXi\fP, \fIa\fP, \fIc\fP の 初期値を指定するための関数である。
-配列の形をした引数の要素はそれぞれ、\fIparam[0\-2]\fP は \fIXi\fP を、 \fIparam[3\-5]\fP は \fIa\fP
-を、\fIparam[6]\fP は \fIc\fP を指定するもの である。 \fBlcong48\fP()  が呼ばれた後で、 \fBsrand48\fP()  か
-\fBseed48\fP()  を呼ぶと、前述の \fIa\fP と \fIc\fP の 標準値が再び設定される。
-.SH 属性
-.SS "マルチスレッディング (pthreads(7) 参照)"
-関数 \fBdrand48\fP(), \fBerand48\fP(), \fBlrand48\fP(), \fBnrand48\fP(), \fBmrand48\fP(),
-\fBjrand48\fP(), \fBsrand48\fP(), \fBseed48\fP(), \fBlcong48\fP() は、
-乱数生成に使用する状態情報をグローバルに保持する。 そのため、 これらの関数はスレッドセーフではない。
-.SH 準拠
-SVr4, POSIX.1\-2001.
-.SH 関連項目
-\fBrand\fP(3), \fBrandom\fP(3)
-.SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
-である。プロジェクトの説明とバグ報告に関する情報は
-http://www.kernel.org/doc/man\-pages/ に書かれている。