Mother-of-all is better than ran2. Mersenne Twister is generally regarded as the best one. If you have a speed problem then you may update your Intel compiler to the latest version (the noncommercial Linux version is free) and enable the SSE2 instruction set. The Gnu compiler is also very good. The warning for mersenne.cpp is not serious. The sign change was intended. Does the warning disappear if you change -1L to 0xFFFFFFFF ? You should not get a floating point exception in ranrot. Do you have the right function prototype from randoma.h ? |