Boost logo

Boost Users :

Subject: [Boost-users] [Random] Getting normal_distribution<> to work
From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2010-07-28 12:33:15

Dear all,

When I run the following simple code, the output is "-1.#IND" in MSVC 2008 and "nan" in GCC 4.4.0. I guess that means something is not initialised yet... So, what's missing here?

boost::normal_distribution<double> gen;
boost::mt19937 engine;
double r = gen(engine);
cout << r;


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at