From: Tanaka Akira Date: 2010-04-07T15:41:36+09:00 Subject: [ruby-core:29292] Re: [Bug #3104] Random: seeding issues 2010/4/7 Marc-Andre Lafortune : > 1) Seeding sometimes ignores the high bit of seed data. > > Random.new((1<<64)-1).rand == Random.new((1 << 65) -1).rand > # => true, should be false > > Probably some leftover code? No. The code is required to specify zero as buf[len-1] for init_by_array. > 3) Finally, I was wondering if there wasn't a typo trashing some of the bits in the initial states when seeding with an array: It should be asked to the author of Mersenne Twister at first. -- Tanaka Akira