Uploaded image for project: 'Commons RNG'
  1. Commons RNG
  2. RNG-70

xoshiro generators

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Implemented
    • None
    • 1.3
    • core, simple
    • None

    Description

      The authors of the algorithm implemented in org.apache.commons.rng.core.source64.XorShift1024Star have produced new generators as described here:

      xorshiro / xoroshiro generators

      I propose to implement the all purpose algorithms using the following classnames:

          source32.XoShiRo128StarStar
          source64.XoRoShiRo128StarStar
          source64.XoShiRo256StarStar
          source64.XoShiRo512StarStar
          source64.XorShift1024Phi
      

      The algorithms are simple to adapt from the c source code and I have created working versions with units tests (analogous to the XorShift1024Star test).

      Each generator must have a corresponding name in the RandomSource enum. I propose:

          XO_SHI_RO_128_SS,
          XO_RO_SHI_RO_128_SS,
          XO_SHI_RO_256_SS,
          XO_SHI_RO_512_SS,
          XOR_SHIFT_1024_PHI,
      

      Note: XorShift1024Phi is an updated implementation of XorShift1024Star using a different multiplier. To share code this could be implemented by moving the implementation to an abstract base class for both XorShift1024Phi and XorShift1024Star which accepts the multiplier in the constructor.

      The authors also provide code for faster generators for use in creating floating-point random numbers where the lower order bits are discarded. These could be named:

          source32.XoShiRo128Plus
          source64.XoRoShiRo128Plus
          source64.XoShiRo256Plus
          source64.XoShiRo512Plus
      
          XO_SHI_RO_128_PLUS,
          XO_RO_SHI_RO_128_PLUS,
          XO_SHI_RO_256_PLUS,
          XO_SHI_RO_512_PLUS,
      

      For discussion:

      • The names of the generators.
      • Should the small state 64-bit generator XoRoShiRo128StarStar be implemented? It has a potentially confusing name clash with the 32-bit generator XoShiRo128StarStar. Speed is expected to be the same as XoShiRo256Star but using only half the memory footprint.
      • Should the faster floating-point generators be implemented?

      Attachments

        Issue Links

          Activity

            People

              aherbert Alex Herbert
              aherbert Alex Herbert
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h