New Lagged Fib. PRNG gen and random2.d
bearophile
bearophileHUGS at lycos.com
Sun Aug 25 13:30:03 PDT 2013
monarch_dodra:
> The Lagged Fibonacci generator has interesting properties: For
> starters, you can generate integers or floats with it. With
> floats, it generates numbers in a 0 .. 1 range, making it a
> very nice generator for users that want simple uniform floating
> point generation in that range.
What is its relative performance (measured with LDC2 and/or GDC)
compared to Xorshift and the Mersenne Twister when it is used to
generate integers and when it's used to generate floating point
numbers in 0..1 (for the floating point case you have to use
something like random01 to have a fair comparison)?
> In terms of quality, I'm no expert, but supposedly, it's
> supposed to be good, when properly seeded.
Before being merged into Phobos someone has to measure a bit the
actual quality of the random numbers it produces. To avoid
problems like the ones had with Xorshift. There are suites and
tools to measure the quality of random numbers, like a more
modern version of the famous diehard.
Bye,
bearophile
More information about the Digitalmars-d
mailing list