[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: random function and other math functions
- From: Salvador Espana <sespana@...>
- Date: Mon, 7 Jun 2004 16:29:59 +0200 (CEST)
On Mon, 7 Jun 2004, Lasse Nielsen wrote:
> Additionally, the language reference contains a full rundown of all the
> (lua) stdlib functions, including math.* (to be more specific, section 5.5
> is the one you're looking for: http://www.lua.org/manual/5.0/manual.html#5.5)
It can be useful, in many cases, to have multiple pseudo-random generator
objects which can be used, saved and restored independently. We have made
a bind of c++ MersenneTwister pseudo-random generator to Lua for our work.
This generator is supposed to have better statistical properties than the
standard and is twice faster on our benchmarks. We have included also some
methods to generate random permutations, etc. We are waiting our work to
be finished before making it available, although we can provide this part
if someone is interested.