Expand description
59-bit Multiplicative congruent generator (MCG59).
Library contains MCG generator and utility functions for extracting result and filling byte array.
This is free and unencumbered software released into the public domain.
Modules§
- extract
- Extracting different kind of values from raw 59-bit result
Structs§
- MCG59
- 59-bit Multiplicative congruent generator (MCG59).
Constants§
- A
- a = 13^13
- M
- m = 2^59
- MAX
- maximum generated number is M - 1
- MIN
- minimum generated number is 1
- PERIOD
- period is 2^57
- SEED
- default seed is 1
Functions§
- clamp_
seed - clamps suggested seed into valid range
- validate_
seed - Validate if supplied integer is a valid seed for MCG59 generator.