Boost logo

Boost Users :

Subject: [Boost-users] [random] Cauchy distribution
From: Karsten Ahnert (karsten.ahnert_at_[hidden])
Date: 2011-07-13 14:04:54


Hi,

I have the following code

boost::mt19937 rng;
boost::cauchy_distribution< double > cauchy( 0.0 , 0.1 );

for( size_t i=0 ; i<16 ; ++i )
{
    std::cout << cauchy( rng ) << " ";
}

which produced this sequence :

76513.4 4.3467e+06 -254805 -1.63299e+06 -6.96405e+06 233243 214884
883827 471904 268253 648798 140314 1.43562e+06 653319 -582905 91567.6

I think these number are much to high. The standard deviation should be
0.1. Does anyone knows what went wrong? Is this my failure?

I use boost 1.46 and gcc 4.5.2.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net