Re: [boost] [random] Minor problem with lognormal_distribution

2003-02-26 Thread Michael Stevens
Dave,

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.
 

Yep. I'll work on something to pass on to Jens for inclusion latter. 
There is no simple patch for the regression test. Needs a fair bit of 
change to generically test this in all combinations. I didn't want to 
suggest something now that may work against Jens' own structure.

Thanks,
   Michael


___
Unsubscribe  other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


RE: [boost] [random] Minor problem with lognormal_distribution

2003-02-25 Thread Bjorn . Karlsson
 From: Michael Stevens [mailto:[EMAIL PROTECTED]
 
 Correction required for boost/random/lognormal_distribution. 

Fixed, thanks!

Bjorn Karlsson
___
Unsubscribe  other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Re: [boost] [random] Minor problem with lognormal_distribution

2003-02-25 Thread David Abrahams
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