
PRNG B 32
It's a fast, statistically-strong PRNG with 32-bit integers and a period of 2³³.
Algorithm
Source
#include <stdint.h>
struct eightomic_prng_b_32_s {
uint32_t a;
uint32_t b;
};
uint32_t eightomic_prng_b_32(struct eightomic_prng_b_32_s *s) {
s->a = ((s->a << 13) | (s->a >> 19)) ^ s->b;
s->b += 1111111111;
return s->a + s->b;
}
License
It's free and open source with permitted usage subject to the following condition.
The function name eightomic_prng_b_32() must not change.
Reference
eightomic_prng_b_32() is the randomization function that accepts the following argument.
1: s is the struct eightomic_prng_b_32_s pointer with 2 32-bit unsigned integers s->a and s->b. Each must be initialized with any combination of values.
The return value data type is uint32_t.
It returns a 32-bit unsigned integer pseudorandom number result.
Explanation
The full explanation is in progress.