Michael Stevens [EMAIL PROTECTED] writes:
Dear Boosters,
This is just a quick reminder of regression before boost_1_30_0 gets
released. Without CVS access I can fix it myself and Jens seems to be
offline at the moment. It would be great if someone could step in and
make a simple correction.
The regression is the the return values of the mean and sigma values
of boost::random::lognormal_distribution.
Correction required for boost/random/lognormal_distribution. hpp line 67-68
RealType mean() const { return _mean; }
RealType sigma() const { return _sigma; }
should read.
RealType mean() const { return _mean; }
RealType sigma() const { return _sigma; }
The correction makes the return values identical with those of other
real distributions, cf. normal_distribution line 62
The problem can simply be tested by instantiating the template thus
template boost::normal_distributionboost::mt19937, float;
It should be noted that the problem is NOT picked up by regression
tests in random_test.cpp. The current test procedure
void instantiate_dist(const char * name, const Dist dist)
uses a reference to a constant distribution. It therefore fails to
pickup on the return of non constant member reference.
Michael,
Could you please suggest a patch for the regression tests which will
detect this problem? It's always better to get the test to fail
first before we check in any fixes.
Thanks,
Dave
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
___
Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost