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 _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio