开发者

Mersenne Twister on Little Endian

Does the pseudocode provided in Wikipedia's article on Mersenne Twister work with Little Endian ("atomic elemen开发者_C百科t size" 8 or 16 bit), or any other byte-orderings?

Does it work on 32-bit only systems? (i.e. The number cannot be stored in anything bigger than a DWORD.)

EDIT: Also, what do they mean by 32nd bit of(MT[i])? MT[i] & (1 << 31) or MT[i] & 0x01 or something else?


The algorithm gives you a number. How you store it is irrelevant.

You can have 32-bit numbers on 16-bit systems (ex. C long was 32-bits on 16-bit Windows).

32nd bit means the high bit (MT[i] & (1<<31)).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜