discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] New random number generator


From: Stefan Wunsch
Subject: [Discuss-gnuradio] New random number generator
Date: Wed, 2 Sep 2015 14:10:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

Hi!

I have discovered that the implemented random number generator in
gnuradio (see file [0]) is almost older than me. As written in the code,
the implementation is taken from 'Numerical recipes in C' (see version
from 1992). The problem is that this algorithm is really bad compared to
current algorithms. E.g. the period length is 1e8 compared to an
up-to-date algorithm (Mersenne twister) with a period length of about
1e6000.

I have fixed this [1] using boost.random and the mentioned Mersenne
twister. Furthermore I have written some test-cases and fixed the
transformation to Laplacian random numbers (the current implementation
is wrong). As well, I have added the random class to swig so that you
can use this in python.

Now my question: Before doing a pull request, do you have any concerns
regarding memory use or processing load? Obviously the new
implementation isn't that light-weight as the ten lines of code before.
But the current implementation can not be used in any serious simulation
or publication, which is highly dependent on good random numbers. Some
information about the performance is given on this page: [2]. Look for
the generator mt19937 in table 24.5.

Best regards
Stefan

[0] gnuradio/gnuradio-runtime/lib/math/random.cc
[1] https://github.com/stwunsch/gnuradio/tree/newRandom
[2]
http://www.boost.org/doc/libs/1_59_0/doc/html/boost_random/reference.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]