Hi all

I am trying to compare the quasi-random number generator algorithms. In order 
to do that, I run the following script in the doc/examples directory:

jeremy@tom:~/libs/gsl-1.16/doc/examples$ cat testrng.sh 
for i in sobol niederreiter_2 halton reversehalton; do
  cp qrng.c $i.c
  sed -i s/sobol/$i/ $i.c
  gcc -o $i $i.c -lgsl -lgslcblas
  ./$i > $i.dat
done

jeremy@tom:~/libs/gsl-1.16/doc/examples$ ./testrng.sh 
jeremy@tom:~/libs/gsl-1.16/doc/examples$ 


Now, for the sobol and niederreiter_2 algorithms I get basically the same 
sequence, except that sobol starts at (0.5,0.5) and niederreiter at (0,0). The 
rest of the sequence is the same, except for the last number of course:

jeremy@tom:~/libs/gsl-1.16/doc/examples$ diff sobol.dat niederreiter_2.dat 
0a1
> 0.00000 0.00000
1024d1024
< 0.00146 0.37646
jeremy@tom:~/libs/gsl-1.16/doc/examples$ 


Is this the expected behavior?

Thanks

--
jeremy

Reply via email to