[go: up one dir, main page]

Module formulas

Source
Expand description

Base formulas used elsewhere in the crate.

Constants§

PCG_MUL_64
This is the suggested multiplier for a PCG with 64 bits of state.

Functions§

ieee754_random_f32
Generates an f32 in the signed or unsigned unit range.
ieee754_random_f64
Generates an f64 in the signed or unsigned unit range.
lcg32_jump
Advance a 32-bit LCG by delta steps in log2(delta) time.
lcg32_step
Advance a 32-bit LCG’s state.
lcg64_jump
Advance a 32-bit LCG by delta steps in log2(delta) time.
lcg64_step
Advance a 32-bit LCG’s state.
lcg128_jump
Advance a 32-bit LCG by delta steps in log2(delta) time.
lcg128_step
Advance a 32-bit LCG’s state.
next_binary_exp_distr32
Returns k with probability 2^(-k-1), a “binary exponential distribution”.
xsh_rr_u64_to_u32
“Xor-shift high bits” then “randomized rotate”, u64 down to u32.
xsl_rr_u128_to_u64
“Xor-shift low bits” then “randomized rotate”, u128 to u64.