I had found the normal distribution was definitely different with a test program modeled from this other answer: Boost random number generator. Also looks like in typical usage of my utility, I think it is just using normal, but exponential would be triggered by a different option. Anyway, I confirmed differences for several thousand iterations on the two versions I first mentioned. Then after seeing the answer from Ralf Stubner (thank you), I did some more exhaustive testing and I see a confirmed difference at 1.64 wrt 1.57. After that the output is consistent again at least up to 1.67. I tried 1.57 through 1.67.
Compiled a test program like this:
g++ -I /opt/boost_1_57_0 random_example.cc -O3 -o random_example
Invoked like:
random_example 0 0 9999999 > /tmp/random_example_boost_1_57_0_0_0_9999999.txt
# number of differences in ten million lines
root@ubuntu-02:/tmp# baseline=random_example_boost_1_57_0_0_0_9999999.txt
root@ubuntu-02:/tmp# test=random_example_boost_1_64_0_0_0_9999999.txt
root@ubuntu-02:/tmp# diff -U 0 $baseline $test | grep ^@ | wc -l
5796
# look at first 5 lines of difference
root@ubuntu-02:/tmp# diff $baseline $test | head -5
261,262c261
< -36.8701
< -3.78609
---
> -38.8405
root@ubuntu-02:/tmp#
The example code:
random_example.cc:
#include <iostream>
#include "boost/random.hpp"
#include "boost/generator_iterator.hpp"
using namespace std;
int main(int argc, char **argv) {
typedef boost::rand48 RNGType;
int seed = 0;
int start = 1;
int stop = 100;
if (argc>=2) {
seed = atoi(argv[1]);
}
if (argc>=3) {
start = atoi(argv[2]);
}
if (argc>=4) {
stop = atoi(argv[3]);
}
RNGType rng(seed);
typedef boost::normal_distribution<> dist_t;
boost::normal_distribution<> distribution_params(0.0, 10.0);
boost::variate_generator< RNGType, dist_t >
dice(rng, distribution_params);
for ( int i = start; i <= stop; i++ ) {
double n = dice();
cout << n << endl;
}
}