mercredi 28 septembre 2016

Mersenne Twister 64: origin of 'd' tempering parameter?

Short version: common MT (and MT64) implementations have an extra tempering parameter 'd'. The papers I've looked at describing MT don't include it. Where is it from? When was it added?

Long version! :)

I'm looking at using a family of MT's with different parameters (for reasons). Nishimura published this paper describing a 64-bit MT implementation and a number of alternatives for the A matrix and (u,s,t,l,b,c) tempering parameters. Like the original 32-bit MT paper, this describes the tempering procedure as:

y := x xor (x >> u)
y := x xor ((y << s) and b)
y := x xor ((y << t) and c)
z := x xor (y >> l)

However, real implementations ( a b ) and the parameters described in the MT Wikipedia page have an extra bit mask parameter (referred to as 'd'), applied to the first step of the tempering procedure:

x ^= (x >> 29) & 0x5555555555555555ULL;
x ^= (x << 17) & 0x71D67FFFEDA60000ULL;
x ^= (x << 37) & 0xFFF7EEE000000000ULL;
x ^= (x >> 43);

I don't want to just 'blindly' use the tempering parameters that exclude the parameter 'd' without understanding what it's for... but I can't seem to find any references for why this 'd' parameter was added. (Presumably, it's an improvement...)

Any ideas on what it's for, any references to why it was added?




Aucun commentaire:

Enregistrer un commentaire