Ah, we use that phrase in the UK but it appears to have originated in America.paul doe wrote:Not sure if I understand what you mean.
Egg on one’s face
256GB without any anomalies.
Ah, we use that phrase in the UK but it appears to have originated in America.paul doe wrote:Not sure if I understand what you mean.
Ah, I see. Well, I think I'll fold'em now. Best of luck =Ddeltarho[1859] wrote:Ah, we use that phrase in the UK but it appears to have originated in America.
Using Quark's words (perhaps you remember him):dafhi wrote:I think he means my psychic attacks. They're not 100% intentional :P I'll try to tone it down
Hahahaha what an amusing fellow, indeed =DQuark wrote: dafhi,
You are deeply strange. I'm thinking Jackson Pollock on meth, in a formal mood, doing not Legos, but Lagos.
I'm impressed, but about what I have no idea. Thanks for the code.
OK, this is the idea. It is ridiculously simple.Widynski wrote:X and w need not be set to zero on initialization.
Code: Select all
function MsWs.one() as ulong
m_x *= m_x : m_weilSeq += &Hfedc65a1ce2d9587 : m_x += m_weilSeq
m_x = ( m_x shr 32 ) or ( m_x shl 32 )
return( m_x )
end function
Code: Select all
Function Get64Bit() As UlongInt
return (Cast( Ulongint, Rnd*(2^32) ) Shl 32) Or Cast( Ulongint, Rnd*(2^32) )
End Function
Code: Select all
Randomize , 5
var randomNumber = MsWs( Get64Bit, Get64Bit )
Code: Select all
m_x *= m_x : m_weilSeq += &Hfedc65a1ce2d9587 : m_x += m_weilSeq-
Although we are working on 'uint64_t x' we are only using the middle 32 bits so the output is 32-bit. The period is 2^64 per sequence/stream and we have 2^64 sequences/streams giving a total of 2^128.-dafhi wrote:trying to imagine if that's 2^128 possibilities
Thank you. Corrected.looks like you got a typo
actually it's the bottom 32 bits :Pdeltarho[1859] wrote:.. using the middle 32 bits ..
Excellent. Simple, and even has less state to worry about.deltarho[1859] wrote:OK, this is the idea. It is ridiculously simple.Widynski wrote:X and w need not be set to zero on initialization.
I sorted seed.h and found the largest one to be 0xfedc65a1ce2d9587.
and rewrote Bernard Widynski's algorithm to:
-----------------------------------------------------------------------------------
x *= x; x += (w += &hfedc65a1ce2d9587); return x = (x>>32) | (x<<32);
where x initially can be any value from 0 to 2^64-1. This gives 2^64 entry points to the 2^64 sequence. w initially can be any value from 0 to 2^64-1. This gives 2^64 possible sequences/streams; unlike most generators which only have one possible sequence/stream. The 0xfedc65a1ce2d9587 is a magic number. There are many possible magic numbers but they cannot be programmatically determined to guarantee that they will work.
-----------------------------------------------------------------------------------
The Weyl sequence is now our 'sequence' and the original sequence is no longer allowed to vary and cause the grief that we have had. We never needed three parameters.
So, it needs two seeds? Or we can simply randomly initialize the Weyl sequence so we can specify one parameter (x) as the seed for the entire state? We can also allow to specify the Weyl sequence and leave x at 0 (or randomized, again). Whichever suits you fancy.deltarho[1859] wrote:I use this:and have only tried a few of these so farCode: Select all
Function Get64Bit() As UlongInt return (Cast( Ulongint, Rnd*(2^32) ) Shl 32) Or Cast( Ulongint, Rnd*(2^32) ) End Function
Code: Select all
Randomize , 5 var randomNumber = MsWs( Get64Bit, Get64Bit )
Yes, but sometimes, the simplest answers are the most elusive. Why the comments would need editing? Leave them as they are, to document the thought process and how the solution was derived. If you mean the code, also leave it. Changing it will make the following discussion pointless. I can post both the 32 and 64-bit revised versions if you like for further testing.deltarho[1859] wrote:I allowed one to go to 512GB with PractRand.
Both 'var randomNumber = MsWs()' and 'var randomNumber = MsWs( Get64Bit)' have worked.
I intend to continue testing but, logically, I cannot see how the above can fail.
I said that It was ridiculously simple.
I will post the revised code in due course. A lot of Paul's comments need editing now.
That's very cool, David. If everything turns out ok, I think you should contact Bernard and take due credit for this improvement. You deserve it =Ddeltarho[1859] wrote:Just out of interest.
Using 'var randomNumber = MsWs(Get64Bit, Get64Bit)' I got a [0,1) average of 0.4999782251326222
With 10^8 'x = randomNumber.one/2^32' I got a speed of 604MHz (32-bit Doubles) - very nearly 7 times faster than FB's Mersenne Twister.
I am running another PractRand using MsWs(Get64Bit, Get64Bit). Just two lowest ranking anomalies so far at 128GB.
Yes.paul doe wrote:So, it needs two seeds?
Many of the comments refer to the sequence which my version does not use.Why the comments would need editing?
I think you should contact Bernard and take due credit for this improvement. You deserve it =D
Some folk may think that rather odd but it is how I am. BasicCoder2 and I have something in common (fellow INTP): We like breaking things down to understand how they work. BasicCoder2 is a practical guy and I am a theory guy. Once I have understood something and, perhaps, found a better way to do the same job I then move on. I couldn't care less about credit.Yours truly earlier wrote:If ever it [PCG32II] got in FB there would be no need to mention that I had anything to do with it - I am not into that. O'Neill should be credited, of course.
Very well. I shall post a final, directly usable version as soon as I finish it.deltarho[1859] wrote:Many of the comments refer to the sequence which my version does not use.
Actually, it would suit me not to post my version - less work for me. Folks have your code above and what I have done so it is easy for them to write their own.
Not a problem to me. I'll take the credit then <bwahahahahaha> Well, not really =Ddeltarho[1859] wrote:Some folk may think that rather odd but it is how I am. BasicCoder2 and I have something in common (fellow INTP): We like breaking things down to understand how they work. BasicCoder2 is a practical guy and I am a theory guy. Once I have understood something and, perhaps, found a better way to do the same job I then move on. I couldn't care less about credit.Yours truly earlier wrote:If ever it [PCG32II] got in FB there would be no need to mention that I had anything to do with it - I am not into that. O'Neill should be credited, of course.
Nice! Uncork the champagne =Ddeltarho[1859] wrote:MsWs( GetBit64, GetBit64 ) hard-wired 'sequence' => 1TB PractRand, two lowest ranking anomalies.