[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnubg] Mersenne Twister long seed support + Future Window Build dep
[Bug-gnubg] Mersenne Twister long seed support + Future Window Build dependency change
Sat, 22 Sep 2012 17:50:07 -0600
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1
Generally I wouldn't post about something that seems trivial but it
could (but not likely) will impact some people.
I am going to be doing an experiment and I needed long seed support for
Mersenne Twister. We now support long seeds with Mersenne Twister, but
with it comes a caveat. The way in which MT is initialized with 32 bit
seeds and arbitrary seeds between 0 and 2^19937-1 is different. The side
effect was that by default seeds specified between 0 and 2^32-1 with old
releases of GNUBG using MT would not yield the same numbers with the new
To that end, I have compromised. If you build with GMP (Big number
library) - seeds between 0 and 2^32-1 are initialized the old way.
Anything larger uses the new mechanism. This shouldn't cause anyone too
many concerns. This retains backwards compatibility with seeds used
There is an exception. If there are people who have been building on
platforms with GMP, and have been using Mersenne Twister seeds greater
than 2^32-1 you will see a change. In fact the difference is because
Mersenne Twister didn't properly handle seeds greater than that to begin
with. Long MT seeds had modulo 2^32-1 applied to them, so seed 2^32 was
the same as 0. There are probably not many people in this situation of
using GMP and long seeds, but this is a warning.
If people build WITHOUT GMP support things look pretty much the same,
with one small change. The set seed function now supports seeds between
0 and 2^32-1 rather than 2^31-1 . The option to set the seed has also
been modified to reflect this change.
One thing that has not been done yet. Long seeds must be set from the
command line using "set seed", and can't be specified through the GUI
option. What we really need for GMP builds is to change the data entry
(with spin control) to allow a seed to be entered not constrained to
2^32-1 and would allow for seeds with thousands of digits.
Future releases on Windows will be built with GMP as a dependency, so
the install package will be including libgmp-10.dll . I mention this if
people usually download just the individual GNUBG EXEs and not the
entire installer. People who don't have this dependency installed will
get an error that libgmp-10.dll is missing.
CApp::Sysware Consulting Ltd.
OpenPGP FingerPrint=D81C 6A0D 987E 7DA5 3219 6715 466A 2ACE 5CAE 3304
|[Prev in Thread]
||[Next in Thread]|
- [Bug-gnubg] Mersenne Twister long seed support + Future Window Build dependency change,
Michael Petch <=