Boost logo

Boost-Commit :

From: pbristow_at_[hidden]
Date: 2007-12-17 10:51:08


Author: pbristow
Date: 2007-12-17 10:51:08 EST (Mon, 17 Dec 2007)
New Revision: 42122
URL: http://svn.boost.org/trac/boost/changeset/42122

Log:
Changed support range to avoid a discontinuity at zero.
Text files modified:
   sandbox/math_toolkit/boost/math/distributions/exponential.hpp | 4 +++-
   1 files changed, 3 insertions(+), 1 deletions(-)

Modified: sandbox/math_toolkit/boost/math/distributions/exponential.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/exponential.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/exponential.hpp 2007-12-17 10:51:08 EST (Mon, 17 Dec 2007)
@@ -89,7 +89,9 @@
 { // Range of supported values for random variable x.
    // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
    using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(0, max_value<RealType>());
+ using boost::math::tools::min_value;
+ return std::pair<RealType, RealType>(min_value<RealType>(), max_value<RealType>());
+ // min_value<RealType>() to avoid a discontinuity at x = 0.
 }
 
 template <class RealType, class Policy>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk