New Random Number Generator
Mark4Flies at aol.com
Mark4Flies at aol.com
Tue Jul 30 12:00:43 UTC 2002
<< Hmm. Have you compiled the C code and tested it? Just in case... it
wouldn't be the first time that demo C code had some subtle mis-print in
it. >>
Yes, I copied the C source file from the Mersenne Twister (MT) Web site into
Project Builder on Mac OS X. It ran with out any error. I took the 1000
numbers and brought them into JMP for statistical analysis. They looked
great. (JMP random number generators are based on this same MT algorithm
now.)
<< To check further, knock up a little C prog to take a few numbers and do
the various shifts/masks, and some Squeak code to do the same. Compare;
it should at least illustrate where the differences are creeping in ot
bite you. Chances are good that it is a single trivial typo-like error
somewhere. >>
Thank you for the advice but now I suspect that it is probably not a
typographical error (confirmed original C source) but a subtle difference in
the behavior between Smalltalk and C when it comes to long unsigned integer
operations. I just have no clue!
Again, thanks Tim for looking at this problem for me.
-Mark
More information about the Squeak-dev
mailing list
|