maths

package
v0.5.45 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 6 Imported by: 0

README

サンプルリスト

このディレクトリには以下のサンプルがあります。

file example name note
minmax.go minmax MinMaxは各数値型の最小値と最大値を表示するサンプルです

Documentation

Overview

Package maths -- mathパッケージについてのサンプルが配置されているパッケージです。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MinMax

func MinMax() error

MinMax -- MinMaxは各数値型の最小値と最大値を表示するサンプルです

func NewRegister

func NewRegister() mapping.Register

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL