lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I noticed that Math.random() uses the C RTL's rand() function which as 
I'm sure everyone knows, is rather poor.  It would be fairly trivial 
and small to put in an inline Mersenne Twister implementation.

Have the Lua maintainers considered this?  There is at least one major 
advantage of this (other than the MT pRNG is a lot better than the 
typical C RTL implementations), and that is that Math.random() becomes 
repeatable between platforms.

Thanks,

Brian