Thread: Am I missing something View Single Post
2021-03-04, 03:09   #17
Youjaes

Mar 2021

7 Posts

Quote:
 Originally Posted by LaurV @OP: Note that while other measures (GEC test, certification, etc) target hardware errors, cosmic rays, CPU going drunk, user's dishonesty (cheating for credits or whatever reasons), the random shift targets possible errors in software implementation of the FFT (software errors). If the FFT deals with completely different data each time and still produces the same result at the end (shifted or not) then we can be quite confident that the implementation is right. Code: Ex: 19: Starts with 10: 10, 98, 9602, 448177, 409322, 200240, 160699, 412414, 313150, 282018, 338709, 353913, 150119, 286038, 129657, 199279, 1024, 0 Starts with 52: 52, 2702, 485071, 160883, 339071, 343957, 7723, 400296, 100378, 519603, 444087, 87082, 511841, 238249, 129657, 199279, 1024, 0
You chose special starting values known to produce zero residues for known Mp as of 2004. Only one in four arbitrary starting values do that for any particular Mp which I was easily able to calculate with 64-bit ints for p<32 is Mp. For example, starting values of 8,16,32,64, etc. have residues of zero ~25% of the time for the first 100,000 and the first 1,000,000 shifted single bits. Starting values of consecutive integers demonstrates the same pattern for the first 100,000 and 1,000,000 integers.

If the intention is to test the hardware and FFT, wouldn't it be simpler and more efficient to generate p pseudorandom bits, X, and it's conjugate Y = ((2^p - 1) Xor X) = (2^p - 1) - X, i.e. X + Y = X Or Y = 2^p - 1, since (X*X - 2) mod (2^p - 1) = (Y*Y - 2) mod (2^p - 1) and compute a 128-bit Xor checksum on the two values (Xor 128 bit chunks of data at a time together) and if they don't match, do the two multiplications again so that if the error results are the same, then transmit the RNG seed and the two 128-bit checksums because you just found a confirmed error in the math so it's off to see the wizard. If this test were to be performed every 1,000 or 10,000 multiplications during the LL test, then the health of the computing device can be verified independent of the algorithm immediately and you don't have to wait till you are done and not know until someone runs a second LL to find out there is a problem. This way, you don't have to screw around with start values and can always use s0=4 with confidence.

I good RNG can be found on the Wikipedia page for Xorshift.

https://en.wikipedia.org/wiki/Xorshift

James