The default WinCE RNG is very slow, so we replaced it with Mersenne Twister, which performs well and is well-studied.
Created attachment 32379 [details] patch adding mt19937ar.c for WinCE
Comment on attachment 32379 [details] patch adding mt19937ar.c for WinCE The initialization code should be brought inline with the current system where a function is called.
Created attachment 32386 [details] updated patch Done. Also added an srand call so that the default RNG used to fill the initialization array for MT is itself initialized - I believe in the first patch it was always using the same seed.
Correction: the first patch did call srand because we called initializeRandomNumberGenerator before filling in the array. The second patch needs to call srand explicitly because we replaced part of initializeRandomNumberGenerator instead of calling it first.
Comment on attachment 32386 [details] updated patch The URL in the license http://www.math.keio.ac.jp/matumoto/emt.html is invalid. Where can we go to validate that this code is properly licensed?
Current site seems to be http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html The version of mt19937ar.c for download there is identical except that the url and contact email are different and it includes an extra test function: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)
License is BSD.
Comment on attachment 32386 [details] updated patch License from given urls is BSD. The copy that goes in should have updated url and contact info. Otherwise looks good.
Landed with r45865.