Skip to main content

Mojo package

random

Pseudorandom number generation with uniform and normal distributions.

The random package provides pseudorandom number generation for simulations, games, and statistical applications. It offers both a convenient global PRNG state accessed through package-level functions and explicit generator types for reproducible sequences. The package supports uniform and normal (Gaussian) distributions for various numeric types.

Use this package for Monte Carlo simulations, stochastic algorithms, random sampling, or testing with randomized inputs. This package's functionality is not cryptographically secure and should not be used for security-sensitive applications.

Modulesโ€‹

Was this page helpful?