So, 'Var randomNumber = MsWs( 123456, 42, Cast( Ulongint, &H8b5ad4cef9c2703b ) )' gets to a PractRand 1TB test with only a lowest ranking anomaly at 64GB.
Earlier I thought we had a problem with the Weyl sequence because both
Code: Select all
var randomNumber = MsWs(987654, 0, 8ull shl 32 or 1)
var randomNumber = MsWs(987654, 1, 8ull shl 32 or 1)
failed PractRand with MsWs.isValidSequence( 8ull shl 32 or 1 ) giving True.
From above 'Var randomNumber = MsWs( 123456, 42, Cast( Ulongint, &H8b5ad4cef9c2703b ) )' works to 1TB so I tried 'Var randomNumber = MsWs( 123456, 42, 8ull shl 32 or 1 )'. The only difference is the sequence which MsWs.isValidSequence tells me is OK.
That failed. I tried Cast( Ulongint, 8ull shl 32 or 1 ) and that failed. So, there is more to this sequence lark than meets the eye.
I don't think that we have a problem with the Weyl sequence so I reckon that we don't need to use MSWS.validRandomSequence() for it.
However, we do have a problem with the sequence/stream. I am not in favour of using MSWS.validRandomSequence() for this because '8ull shl 32 or 1' fails but passes MsWs.isValidSequence.
Widynski wrote "The constant s should be non-zero in the upper 32 bits and 1 in the least significant bit."
Your code, Paul, is doing just that. '8ull shl 32 or 1' does just that but fails.
This tells me that there is more to the constant s than Widynski realizes.
seed.h has 25000 values. I very much doubt that Widynski has tested that lot. They may all satisfy MsWs.isValidSequence but how many will fail because "there is more to this sequence lark than meets the eye."
I picked three at random and they worked. When I say worked I mean they got past the first PractRand hurdle - the failures were immediate. I cannot go through 25000 looking for a dead duck; assuming that there is one.
I have just tried 14,828,140,070,311,027,921 (CDC822D4C29FE4D1) which is not in seed.h. I have just gone past 128GB without a single anomaly. So, where did I get that number from? It is a bog standard 64-bit prime number. However, it satisfies Widynski's criteria so I am not proving anything.
Interestingly, '8ull shl 32 or 1' (34359738369) is not
a prime number.
Perhaps Widynski's criteria are not strong enough. Perhaps the criteria plus 's' being a prime number is the answer.
However, 4294967423 (000000010000007F) is working. It satisfies Widynski's criteria but is not a prime number.
Houston, we have a problem. <smile>