문제

Does the pseudocode provided in Wikipedia's article on Mersenne Twister work with Little Endian ("atomic element 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)).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top