Alex Herbert created RNG-168:
--------------------------------

             Summary: LXM family of random number generators
                 Key: RNG-168
                 URL: https://issues.apache.org/jira/browse/RNG-168
             Project: Commons RNG
          Issue Type: New Feature
          Components: core, simple
    Affects Versions: 1.4
            Reporter: Alex Herbert


JDK 17 updates the random number support and adds a LXM family of random number 
generators. The generators are described in the following paper:
{noformat}
Blackman and Vigna (2021)
Scrambled Linear Psuedorandom Number Generators.
ACM Transactions on Mathematical Software, vol 47, pp 1–32
{noformat}
[https://dl.acm.org/doi/10.1145/3460772]

The generators mix the output of a linear conguential generator (LCG; L) and a 
Xor-based generator (XBG; X). The paper provides code examples for 
L64X128MixRandom and L128X256MixRandom from JDK 17.

Details of the combinations of the linear conguential generator (LCG; L) and 
Xor-based generators (XBG; X) used in JDK 17 are provided in the package 
javadoc:
[JDK 17 
java.util.random|https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/package-summary.html]

The current commons RNG library implements all the XBG generators. Adding 
support for these generators should add a LCG to combine with the output of the 
XBG via the specified mix function.

All constants are supplied in the JDK 17 package javadoc to allow 
implementation with the exception of the mixing functions lea32 and lea64. The 
lea64 function is provided in the paper above but the reference origin is 
personal communication with Doug Lea (2013). Thus the lea32 mix function for 
32-bit generators is not published. Obtaining from the JDK source code is 
possible but would be subject to the Java licence.

The generators support jump functionality and are suitable for streaming in 
large numbers for parallel applications (the paper tests up to 2^24 generators) 
by using a different additive constant for the LCG for each generator to ensure 
no sequence overlap. Creating a new additive constant is significantly faster 
than performing a jump operation.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to