[
https://issues.apache.org/jira/browse/RNG-94?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alex Herbert resolved RNG-94.
-----------------------------
Resolution: Abandoned
Mix based generators using a single long are limited to a period of 2^64. This
is of limited use for modern Monte Carlo methods that may far exceed this
period length when run multiple times in parallel. In is expected that this
type of generator would have little use in practice over other generators in
the library.
> Add RotateRotateMultiplyXorMultiplyXor generator
> ------------------------------------------------
>
> Key: RNG-94
> URL: https://issues.apache.org/jira/browse/RNG-94
> Project: Commons RNG
> Issue Type: New Feature
> Components: core
> Affects Versions: 1.3
> Reporter: Alex Herbert
> Assignee: Alex Herbert
> Priority: Minor
>
> The generators described on the MostlyMangling website [Better, stronger
> mixer and a test
> procedure|http://mostlymangling.blogspot.com/2019/01/better-stronger-mixer-and-test-procedure.html]
> show better output than the Stafford variant 13 mixing function used in
> SplitMix or the murmur hash 3 mixing function used in ThreadLocalRandom for a
> 64-bit based mixer function.
> {code}
> static inline uint64_t ror64(uint64_t v, int r) {
> return (v >> r) | (v << (64 - r));
> }
> // Old mixer, my rrmxmx
> uint64_t rrmxmx(uint64_t v) {
> v ^= ror64(v, 49) ^ ror64(v, 24);
> v *= 0x9FB21C651E98DF25L;
> v ^= v >> 28;
> v *= 0x9FB21C651E98DF25L;
> return v ^ v >> 28;
> }
> // New mixer, "rrxmrrxmsx_0", this is much more well behaved although
> // slightly slower doing 2 rotations instead of the shift in the middle
> // of rrmxmx.
> // With a unit counter starting at 0, it has passed 128 TB of
> // PractRand 0.94 -tf 2 without anomalies found past 2 TB.
> uint64_t rrxmrrxmsx_0(uint64_t v) {
> v ^= ror64(v, 25) ^ ror64(v, 50);
> v *= 0xA24BAED4963EE407UL;
> v ^= ror64(v, 24) ^ ror64(v, 49);
> v *= 9FB21C651E98DF25UL;
> return v ^ v >> 28;
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)