I've ported this PRNG that i personnally use in Squeak.
-- It's a rather "standard" one (used in gfortran). Ref http://sci.tech-archive.net/Archive/sci.math.num-analysis/2005-11/msg00352.html Currently, it generates Float on whole 53 bits significand range, while the MersenneTwister only generates 32 bits as currently configured. I have the feeling that this should be some sort of tunable feature with a common API... This extra-precision makes it almost twice slower than the MersenneTwister implementation, but 32 bits timings are similar. RandomGenerator allSubclasses collect: [:prng | | p | p := prng new. prng -> [100000 timesRepeat: [ p next ]] timeToRun] as: Array. -> LCRandom->0:00:00:00.028 LehmerRandom->0:00:00:00.164 MersenneTwisterRandom->0:00:00:00.754 PMRandom->0:00:00:00.151 MarsagliaKissRandom->0:00:00:01.396 It is also to be noted that Marsaglia's algorithm is a bit more robust than Mersenne to poor seed initialization (using a poor seed may result in altered whiteness and distribution during a more or less long transient). You received this message because you are subscribed to the Google Groups "SciSmalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
By the way, did someone started any PRNG randomness test like http://en.wikipedia.org/wiki/TestU01?
-- On Monday, April 21, 2014 10:23:24 PM UTC+2, Nicolas Cellier wrote:
You received this message because you are subscribed to the Google Groups "SciSmalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |