]> git.draconx.ca Git - cdecl99.git/commit
tests: Use 32-bit arithmetic for seed expansion.
authorNick Bowler <nbowler@draconx.ca>
Fri, 23 Feb 2024 03:26:01 +0000 (22:26 -0500)
committerNick Bowler <nbowler@draconx.ca>
Fri, 23 Feb 2024 03:26:01 +0000 (22:26 -0500)
commitcb4da2b973ce208490cb4c54da26a5e245e495a5
treee4e44230370eaf7fc2c1a5c68f3f0af3fd3cc270
parent4c819e9466a0573afae0f9787a4704a479517624
tests: Use 32-bit arithmetic for seed expansion.

To facilitate a future port to older C implementations, replace
splitmix64 in the seed expansion with a very similar algorithm
based purely on 32-bit arithmetic.

This changes the generated random sequences for a particular seed
but means there is no need to implement a 64-bit multiplier for
such a trivial purpose.
t/rng-test.c
t/rng.c