4 ms·
Why do you need an arbitrary distribution? We are talking about breaking ties, just use uniform. You can probably just use RDRAND.
by kortex 5y ago
Why do you need an arbitrary distribution? We are talking about breaking ties, just use uniform. You can probably just use RDRAND.
- medo-bear 5y agoi agree. to break ties uniform distribution should be sufficient
- Hendrikto 5y agoThey are equivalent. Generating an arbitrary distribution from a uniform one is trivial.
- kortex 5y agoIf you are willing to accept lookup tables or approximations, then yeah, arbitrary distributions are trivial. However for certain domains, you may want a more closed form solution for mapping uniform to your distribution, which may not be obvious. E.g. I would say generating pink noise is not "trivial" because there is no closed form solution (c.f. generating gaussian distribution via Box-Muller, that is trivial), so you need to pick a method which may have tradeoffs.