Conversation
Edited 1 year ago

Replaced a classic s * 1103515245 + 12345 rand() implementation with a RXS-M-XS permuted congruential generator. This change makes rand() work better with naive user code, such as one relying on proper randomness of the low-order bits (for example rand() % 2).

1
0
1
@harrysintonen Quite recent RNG. Added to my backlog after looking from Wikipedia the implementation: "FPGA exercise: https://en.wikipedia.org/wiki/Permuted_congruential_generator";. Perfect learning for my low FPGA skills with low-end'ish Lattice FPGA ;-) [but with open source stack, which is rare]. Thx.
0
0
0