Skip to main content

Generate professional pseudo-random number package in python.

Project description

Pure_PRNG

PyPI PyPI - Status GitHub Release Date Language grade: Python Codacy Badge PyPI - Downloads PyPI - Python Version PyPI - License

Generate professional pseudo-random number package in python.

Xoshiro256++ algorithm has been completed.

There are "methods" that specify the period of a multi-precision pseudo-random sequence.

Installation

Installation can be done through pip. You must have python version >= 3.8

pip install pure-prng

Usage

The statement to import the package:

from pure_prng_package import pure_prng

Example:

>>> seed = 170141183460469231731687303715884105727
>>> period = 115792089237316195423570985008687907853269984665640564039457584007913129639747

>>> prng_instance = pure_prng(seed)

>>> prng_instance.source_random_number()
63704397730169193686456860639078459647664747236380824242857347684562650854070

>>> prng_instance.rand_float()
mpfr('0.5501619164985171033237722626311247973459654767593884512471329918122925574973017',257)
>>> prng_instance.rand_float(period)
mpfr('0.6665079772632617788674079157248027245703466196226109430388828957294865649611888',256)

>>> prng_instance.rand_int(100, 1)
mpz(54)
>>> prng_instance.rand_int(100, 1, period)
mpz(61)

>>> prng_instance.get_randint_set(100, 1, 6)
{mpz(5), mpz(9), mpz(18), mpz(54), mpz(57), mpz(93)}

>>> prng_instance.rand_with_period(period)
103085265137502064472166298218885841110988755115459404830932952476483720814169

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pure_prng-0.9.4.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

pure_prng-0.9.4-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file pure_prng-0.9.4.tar.gz.

File metadata

  • Download URL: pure_prng-0.9.4.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for pure_prng-0.9.4.tar.gz
Algorithm Hash digest
SHA256 10c7521f060ebd235fb185f32b09f9b700ee21db3cf8e89ad6e7be9a406e9ab5
MD5 cfc642482c21f450a0699af18e7bebba
BLAKE2b-256 4ba74f3c7de86710ec6db5294c44c3204080e4fccf15c484b28094e06f0ccf83

See more details on using hashes here.

File details

Details for the file pure_prng-0.9.4-py3-none-any.whl.

File metadata

  • Download URL: pure_prng-0.9.4-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for pure_prng-0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f7b97d165fdd82564bd74e99dbd8502018e6e9f2528faafabc0da4f334fd42e6
MD5 3035684225b48289d741e48ba6f4e69a
BLAKE2b-256 20b114e5ca2102c175f7b1f81e1b06a09981b31ed273ac67e46cabffd40054d4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page