Add xoshiro256** generator in LfRng #2
Loading…
Reference in a new issue
No description provided.
Delete branch "fputs/rng"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds
LfRng, an xoshiro256** 1.0 stream in a caller-owned struct. Seeding is four SplitMix64 steps and reads no clock or device.src/rng.ckeeps the Blackman/Vigna public-domain dedication.jumpandlong_jumpare not included.lf_rng_next_rangeuses rejection sampling (zone = (-n) % ninuint64_t) so the result is uniform on[0, n). A power of two consumes one draw. An all-zero state is rejected before the update.The seed-0 state and the first outputs in the tests match the functions in the brief.
Tested with
-DCMAKE_BUILD_TYPE=Debug -DFLINT_SANITIZE=ON -DCMAKE_C_EXTENSIONS=OFF.ctest --label-exclude slow: 26/26 passed.