Contains implementations of Random Number Generators
Project description
gregs_rng
A package for generating random numbers using various methods. The current version only supports the Linear Congruential Method.
Linear Congruential Generator:
Thompson, W. E. (1958). A Modified Congruence Method of Generating Pseudo-Random Numbers. The Computer Journal, 1(2), 83–88. https://academic.oup.com/comjnl/article-abstract/1/2/83/425243 Rotenberg, A. (1960). A New Pseudo-Random Number Generator. Journal of the ACM, 7(1), 75–77. https://dl.acm.org/doi/10.1145/321008.321019 https://en.wikipedia.org/wiki/Linear_congruential_generator
Choice of parameters for LCG:
Donald E. Knuth (1981). The Art of Computer Programming, Volume 2: Seminumerical Algorithms (2nd ed.). Addison-Wesley. https://en.wikipedia.org/wiki/The_Art_of_Computer_Programming
Press, W. H., Teukolsky, S. A., Vetterling, W. T., & Flannery, B. P. Numerical Recipes in C: The Art of Scientific Computing, 2nd ed., Cambridge University Press, 1992. https://en.wikipedia.org/wiki/Numerical_Recipes
Install:
pip install gregs_rng
Import and Use:
from gregs_rng import lcg
g = lcg(42)
print(next(g))
print(next(g))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gregs_rng-0.1.5.tar.gz.
File metadata
- Download URL: gregs_rng-0.1.5.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1440c6fc894fd9cf97c5b96ac39d832ea03668b4b17cd0d3da823bc8295d65b3
|
|
| MD5 |
655d8e44465fd777a7b6e1b4f3aebeda
|
|
| BLAKE2b-256 |
68d32ef2f3d2a5f3a74a0cac7975336e17686d7051e3568f1f133b7bc4de5b8f
|
Provenance
The following attestation bundles were made for gregs_rng-0.1.5.tar.gz:
Publisher:
pypi.yml on gregdorshimer/gregs_rng
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gregs_rng-0.1.5.tar.gz -
Subject digest:
1440c6fc894fd9cf97c5b96ac39d832ea03668b4b17cd0d3da823bc8295d65b3 - Sigstore transparency entry: 1705145774
- Sigstore integration time:
-
Permalink:
gregdorshimer/gregs_rng@b720250388fc46127608a4e053d701a3f3b0461f -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/gregdorshimer
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@b720250388fc46127608a4e053d701a3f3b0461f -
Trigger Event:
push
-
Statement type:
File details
Details for the file gregs_rng-0.1.5-py3-none-any.whl.
File metadata
- Download URL: gregs_rng-0.1.5-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb6a8d03a43e18ce8f40c8812de0c091831aad7b26df05a151162171fc6845df
|
|
| MD5 |
3574943217f022ed5cd619e9a9d65087
|
|
| BLAKE2b-256 |
a65e69746177f832c747174e3f7c2a68a438b2250f731ba8e15143e5a0e47cd1
|
Provenance
The following attestation bundles were made for gregs_rng-0.1.5-py3-none-any.whl:
Publisher:
pypi.yml on gregdorshimer/gregs_rng
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gregs_rng-0.1.5-py3-none-any.whl -
Subject digest:
bb6a8d03a43e18ce8f40c8812de0c091831aad7b26df05a151162171fc6845df - Sigstore transparency entry: 1705145818
- Sigstore integration time:
-
Permalink:
gregdorshimer/gregs_rng@b720250388fc46127608a4e053d701a3f3b0461f -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/gregdorshimer
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@b720250388fc46127608a4e053d701a3f3b0461f -
Trigger Event:
push
-
Statement type: