You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Alex Herbert (Jira)" <ji...@apache.org> on 2019/10/07 11:23:00 UTC

[jira] [Created] (RNG-122) Change SeedFactory random source

Alex Herbert created RNG-122:
--------------------------------

             Summary: Change SeedFactory random source
                 Key: RNG-122
                 URL: https://issues.apache.org/jira/browse/RNG-122
             Project: Commons RNG
          Issue Type: Improvement
          Components: simple
    Affects Versions: 1.3
            Reporter: Alex Herbert
            Assignee: Alex Herbert


The SeedFactory uses {{XOR_SHIFT_1024_S}}. This has a systematic failure in BigCrush using the lower 32-bit bit in reverse order:

[Xorshift1024*, xorshift1024+, xorshift128+ and xoroshiro128+ fail statistical tests for linearity|https://www.sciencedirect.com/science/article/pii/S0377042718306265?dgcid=author]

I have tested {{XOR_SHIFT_1024_S}} and {{XOR_SHIFT_1024_S_PHI}} using 10 runs of BigCrush and see the following results:

{noformat}
RNG                     Bit-reversed    TestU01 (BigCrush) 
XOR_SHIFT_1024_S        true            1,2,1,1,1,1,2,2,1,1
XOR_SHIFT_1024_S_PHI    true            1,1,1,1,2,1,1,1,1,1

RandomSource,Bit-reversed,Test,Failures,Failed
XOR_SHIFT_1024_S,true,TestU01 (BigCrush),1,80  LinearComp, r = 0
XOR_SHIFT_1024_S,true,TestU01 (BigCrush),1,80  LinearComp, r = 0
XOR_SHIFT_1024_S,true,TestU01 (BigCrush),1,80  LinearComp, r = 0
XOR_SHIFT_1024_S,true,TestU01 (BigCrush),1,80  LinearComp, r = 0
XOR_SHIFT_1024_S,true,TestU01 (BigCrush),1,80  LinearComp, r = 0
XOR_SHIFT_1024_S,true,TestU01 (BigCrush),1,80  LinearComp, r = 0
XOR_SHIFT_1024_S,true,TestU01 (BigCrush),1,80  LinearComp, r = 0
XOR_SHIFT_1024_S,true,TestU01 (BigCrush),2,68  MatrixRank, L=1000, r=0|80  LinearComp, r = 0
XOR_SHIFT_1024_S,true,TestU01 (BigCrush),2,25  ClosePairs mNP2S, t = 16|80  LinearComp, r = 0
XOR_SHIFT_1024_S,true,TestU01 (BigCrush),2,74  RandomWalk1 M (L=50, r=0)|80  LinearComp, r = 0
XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80  LinearComp, r = 0
XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80  LinearComp, r = 0
XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80  LinearComp, r = 0
XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80  LinearComp, r = 0
XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80  LinearComp, r = 0
XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80  LinearComp, r = 0
XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80  LinearComp, r = 0
XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80  LinearComp, r = 0
XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80  LinearComp, r = 0
XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),2,80  LinearComp, r = 0|80  LinearComp, r = 0
{noformat}

This shows a systematic failure of the {{LinearComp}} test as observed in the paper linked above.

Update the SeedFactory to use a different generator.





--
This message was sent by Atlassian Jira
(v8.3.4#803005)