[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Replacing rand()
- From: Brian Hook <hook_l@...>
- Date: Mon, 23 Feb 2004 13:15:34 -0500
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