Documentation
¶
Overview ¶
Package maths -- mathパッケージについてのサンプルが配置されているパッケージです。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRegister ¶
NewRegister -- このパッケージ用のサンプルを登録する mapping.Register を生成します。
func RndPcg ¶ added in v0.5.45
func RndPcg() error
RndPcg は、math/rand/v2のPCGを利用してローカル乱数生成器を使うサンプルです。
- PCG : 速くて統計的に良い、だけど暗号的には弱い - ChaCha8: ChaCha20 の軽量版で、かなり強い(準暗号的)乱数を生成
ただし、公式ドキュメントでは「セキュリティ用途には math/rand/v2 ではなく crypto/rand を使え」と書かれています。
PCG も含めて擬似乱数生成器は「同じ seed(初期状態)+同じ呼び出し順」なら同じ乱数列を再生成できます。
REFERENCES ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.