Eightomic iconEightomic

PRNG A 64

It's an extremely-fast, statistically-weak PRNG with 64-bit integers and a period of 2⁶⁵.

Algorithm

Source

#include <stdint.h> struct eightomic_prng_a_64_s { uint64_t a; uint64_t b; }; uint64_t eightomic_prng_a_64(struct eightomic_prng_a_64_s *s) { s->a += 11111111111111111ULL; s->b += (s->a << 16) | (s->a >> 48); return s->b; }

License

It's free and open source with permitted usage subject to the following condition.

The function name eightomic_prng_a_64() must not change.

Reference

eightomic_prng_a_64() is the randomization function that accepts the following argument.

1: s is the struct eightomic_prng_a_64_s pointer with 2 64-bit unsigned integers s->a and s->b. Each must be initialized with any combination of values.

The return value data type is uint64_t.

It returns a 64-bit unsigned integer pseudorandom number result.

Explanation

The full explanation is in progress.