3 ms·
This post https://jacquesheunis.com/post/bounded-random/ https://jacquesheunis.com/post/bounded-random/ from 2021 contains some newer techniques.
by stevan 1y ago
This post https://jacquesheunis.com/post/bounded-random/ https://jacquesheunis.com/post/bounded-random/ from 2021 contains some newer techniques.
- kwillets 1y agoExtended-width multiplication works, but the cost of extra random bits is often a lot higher than the range arithmetic. Somewhere in my github there's an indefinite-width multiply that only adds bits while there's a risk of carry into the 1's digit; the check for that is quite cheap.