Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
维基百科关于 Mersenne Twister 的文章中提供的伪代码是否适用于 Little Endian(“原子元素大小”8 或16 位)或任何其他字节顺序?
它仅适用于 32 位系统吗?(即该数字不能存储在大于 a 的任何内容中DWORD。)
DWORD
编辑:另外,它们是什么意思32nd bit of(MT[i])?MT[i] & (1 << 31)还是MT[i] & 0x01别的什么?
32nd bit of(MT[i])
MT[i] & (1 << 31)
MT[i] & 0x01
该算法为您提供了一个数字。你如何存储它是无关紧要的。
您可以在 16 位系统上使用 32 位数字(例如,Clong在 16 位 Windows 上是 32 位)。
long
第 32 位表示高位 (MT[i] & (1<<31))。