Mother-of-all is better than ran2. Mersenne Twister is
generally regarded as the best one.
It is very good to know. I will choose MT for my simulations. I thought Mother-of-all, as its name would indicate, was the best one. Even though MT is rather new, I like it because it has a colossal period 10^6001 (compared to 10^18 by ran2) and with your code, it works more than twice faster than ran2! It has also been tested strictly. Do you have or can you give me a hint for any test which compares directly MT with ran2? I tried to google the matter, but only indirect materials did I find.
The warning for
mersenne.cpp is not serious. The sign change was
intended. Does the warning disappear if you change -1L
to 0xFFFFFFFF ?
Yes, the warning disappeared when I made the change! Should I keep the code after change or I should convert it back to the -1L one? The two numbers should be the same?
You should not get a floating point
exception in ranrot. Do you have the right function
prototype from randoma.h ?
Yes, I did! But still. Maybe due to the fact that my OS is the 32-bit version?Thank you very much for your answers and your effort to build and distribute the code! |