64 bit PCG PRNG

General FreeBASIC programming questions.
srvaldez
Posts: 3379
Joined: Sep 25, 2005 21:54

Re: 64 bit PCG PRNG

Post by srvaldez »

oh well, it was worth a try.
perhaps a different algorithm is needed to get good 64-bit PCG random numbers
deltarho[1859]
Posts: 4305
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: 64 bit PCG PRNG

Post by deltarho[1859] »

O'Neill's algorithm may be OK and it could be Robert Kern's implementation which is at fault.

BTW, the reason I do a '0.5' test is because randomess is sufficient for uniformity so non-uniformity implies non-random. A large deviation from 0.5 proves non-uniformity. Of course, uniformity is not sufficient for randomness.
deltarho[1859]
Posts: 4305
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: 64 bit PCG PRNG

Post by deltarho[1859] »

'Been looking at the code. There is a lot of emulated 128-bit arithmetic going on. What I had not done was check the speed. It is coming at 7MHz on my machine before any conversion to floating point. With PCG32II I am getting 493MHz floating point with gcc 5.2 (-O3). I reckon that with FB our best bet is to use two 32-bit outputs. Knuth64 is 64-bit but PractRand eats LCGs for breakfast.
Post Reply